   SDL app exiting weirdness
  Heya all,This is the first time I've used the SDL library, and the app that I've been working on for over a week started exiting at strange, seemingly random times.  I've read that it will exit if I try to write pixels off screen, but I doubt this is the cause.  In fact, I've commented out every single change that I've made since my last stable build (a back up from a couple of days ago, which is still stable).Is this something that comes up?!?  I'm at a complete loss.Thanks All,~Argo   
  If it's a small enough project, it might just be a matter of putting some kind of logging/output (even a basic printf) at certain key locations to narrow down the problem. Or, if you want to get to know your tools better, get acquainted with a debugger of your choice and step through the code.   ;  Run the debugger and when it crashes, look at the Call Stack to see what was the last few things called. It should shred some light on the subject.   ;  I had a problem like this myself. My application would exit if left it idle for too long. The problem: I had a huge memory leak in my code. Double check where you blit your stuff to the screen. Make sure you free all your surfaces. Maybe even post your drawing loop. Find a good tool to check for memory leaks.   ;Quote:Original post by argonautHeya all,This is the first time I've used the SDL library, and the app that I've been working on for over a week started exiting at strange, seemingly random times.  I've read that it will exit if I try to write pixels off screen, but I doubt this is the cause.  In fact, I've commented out every single change that I've made since my last stable build (a back up from a couple of days ago, which is still stable).Is this something that comes up?!?  I'm at a complete loss.Thanks All,~ArgoMake sure you're freeing all surfaces allocated.  Also, don't load and then unload resources every frame.   ;  I’m having a similar problem. I’m not really working with graphics with the exception of loading a few bitmaps when the program loads. At random times I will receive an SDL_QUIT message. This only happened when I change the compilers optimization settings though. It works on the natuaral debug settings. Anyone know what the problem could be?   