| Summary: | Access violation in SDL_audio.c in SDL_RunAudio() | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Leeor Dicker <leeor_net> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P1 | Keywords: | target-2.0.0 |
| Version: | 2.0.0 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
| Attachments: |
'friendly' debug info
Disassembly info |
||
Created attachment 1253 [details]
Disassembly info
Dissassembly info
Would like to post an update. I have found either a work-around or a possible issue with documentation when migrating from SDL1.2 to SDL2.0. Adding a call to SDL_CloseAudio() prior to calling Mix_Quit() and SDL_QuitSubSystem(SDL_INIT_AUDIO) resolves this problem. Calling it after these two calls and the crash remains. I'm now unsure in what order I should be calling these functions and what functions I should or should not be calling. As a note, this is a project that used SDL1.2 and recently switched to SDL 2.0, first with Hg versions and now the latest RC. As a further side note, I never do call SDL_OpenAudio() anywhere in the code which is why I never thought to use (or even knew about) SDL_CloseAudio(). On a whim I disabled the calls to Mix_Quit and SDL_QuitSubSystem so that's when I went exploring. Should I be init'ing SDL_Audio and SDL_Mixer differently than I currently do? I'll be happy to update wiki documentation but I have no information about what assumptions are made and so on (forgive my wordiness, want to be sure I include all relevant information and offer assistance where possible). Final comment for now as I believe I have resolved the error on my side. As suspected it was a bug in my code. I used SDL_Mixer's Mixer_OpenAudio() and never called Mixer_CloseAudio(). For whatever reason it never posed a problem until the recent SDL2 RC release which probably did a better job cleaning up after itself (just a guess). This issue can be marked as resolved. Thanks for following up! :) |
Created attachment 1252 [details] 'friendly' debug info Crash appears after updating to latest SDL2 RC. After building from source myself, there appears to be an issue within SDL2 which appears to access a NULL pointer. The crash only occurs during exiting of the program and only when the debugger is attached (it would appear Windows 7 ignores the exception in both debug/release modes when the program is already terminating). Crash occurs in both Release and Debug modes. Attached is a screenshot with debugger information as best as I can retrieve it. I'm unfamiliar with SDL's audio code and hope that the information I'm providing is helpful. As a note, this happens at the same point every time I attempt to terminate SDL and seems to happen after I've shut down the SDL audio subsystems.