| Summary: | Crash on SDL_Quit(), at SDL_audiocvt.c:1001, because stream->reset_Resampler_func function pointer is NULL (rev 016a40fda1bb) | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vitaly Novichkov <admin> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | CC: | admin |
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Debugger state | ||
I've added a NULL check in https://hg.libsdl.org/SDL/rev/7e935b2c430f to stop the crash, but I need to track down how we ended up in that state, so I'll leave this bug open and assigned to me for now. --ryan. Oh, this is easy. src_rate == dst_rate, so no resampling was set up. :) A NULL check is the right thing to do here. |
Created attachment 2661 [details] Debugger state Today I tried to review and test new updates (and update my patch for resampler's chunk length calculation). But on an attempt to close library by SDL_Quit() I got a crash on attempt to call stream->reset_Resampler_func() function pointer which is NULL! I see you have added ability to use libresample instead built-in resampler, but I built with internal resampler without adding extra dependencies. Seems you forgot to check that function for zero (in case if reset is not needed) or you forgot to set it in necessary moment, or you zeroed it BEFORE calling this.