devkitPro / libctru

Homebrew development library for Nintendo 3DS/Horizon OS user mode (Arm11)
https://libctru.devkitpro.org/
776 stars 170 forks source link

dspInit() causes a delayed deadlock when appStatus == APP_NOTINITIALIZED #200

Closed aliaspider closed 9 years ago

aliaspider commented 9 years ago

specifically, calling DSP_UnloadComponent when the status is still APP_NOTINITIALIZED seems to be the problem. this doesn't affect 3dsx builds started from the HBL currently since they start with the APP_RUNNING status.

adding

if(!aptGetStatus())
   aptWaitStatusEvent(); 

before this line https://github.com/smealum/ctrulib/blob/great-refactor/libctru/source/services/dsp.c#L17 prevents the deadlock.

fincs commented 9 years ago

Fixed with 6bdfa1a.