mgba icon indicating copy to clipboard operation
mgba copied to clipboard

Crash when unplugging current audio device or resuming from sleep mode

Open im-mi opened this issue 5 years ago • 0 comments

Description

mGBA crashes when unplugging the current audio device. It also crashes when resuming from sleep mode (presumably due to the audio device re-initializing itself).

This affects only the SDL audio driver. Using the Qt Multimedia driver prevents it from crashing*, but then everything runs too slowly.

* When using the QT Multimedia driver: instead of crashing, the emulated software freezes. It can be unfrozen by flipping between audio drivers. However, pausing after doing so may cause the emulated software to freeze indefinitely.

Additional Information

mGBA Version: 0.7-b1 Branch: heads/refs/tags/0.7-b1 Revision: 776d8a7f7126aa6fe215a22c507a00e2aba9911a

OS: Windows 10 64-bit CPU: Intel® Core™ i7-4770 GPU: NVIDIA GeForce GTX 750 Ti Primary Audio Device: Focusrite Scarlett 2i4 USB Other Audio Devices: None

Debugging Information

Running it through a debugger yields the following message: Exception thrown at 0x0057F1F1 in mGBA.exe: 0xC0000005: Access violation reading location 0x00000000.

Armchair programmer opinion: Looks like there might be a null reference exception when there's no audio device available for a brief moment.

im-mi avatar Nov 30 '18 20:11 im-mi