Advertisement

Exiting SDL in Windows

Started by August 23, 2004 05:09 PM
15 comments, last by Gyrbo 20 years, 3 months ago
Are you calling SDL_Quit() yourself AND using atexit(SDL_Quit) by any chance?
my atexit() line is:

atexit(cleanup);

then I have a function which calls the uninitalizers for the three libraries I am using: SDL, SDL_ttf, SDL_mixer... so no I am not calling the SDL_Exit() function twice...
Advertisement
try letting go if the interfaces in the opposite order you aquired them

ex. initilaize
SDL
TTF
AUDIO

let go this way

AUDIO
TTF
SDL
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
That didn't work
What is called before the HandleMouse routine?
Maybe the function before it messes up the stack.
Just an idea.
Also remember that SDL uses multiple threads, so when you look at your call stack, to find where it crashes, there may be more than one call stack. For the same reason, it seems to me that a printf may not be a reliable way to test were a program crashes, because the problem could be in another thread.
Advertisement
AFAIK, SDL doesn't use more than one thread unless you make them yourself. I could be wrong, though. Mind directing me to a doc?

Kelly G's points are valid if you are using thread.

This topic is closed to new replies.

Advertisement