[SDL] Programs close so fast
Hi there! I've a question that maybe is a little idiot :P There are some programs that, when I compile them, I try to run them but they close so fast. But when I push on the "debug" button.. they work! I'm using Dev-C++ 4.9.9.2.
What's going on?
Thanks a bunch
Sounds to me like you have a memory problem; one common symptom of those types of problems is that they work fine in Debug mode but not in Release mode, or vice versa. Check to make certain you aren't trying to use uninitialized values anywhere.
Also, if you add logging to your program, then you'll have a better idea of what it's doing even if it exits. My programs generate copious logs; while I can always remove them later, they're very helpful during the development process.
Also, if you add logging to your program, then you'll have a better idea of what it's doing even if it exits. My programs generate copious logs; while I can always remove them later, they're very helpful during the development process.
I'd say that there is either a problem with your game loop or you are raising an access violation because you are using a "bad" variable, as Derakon said. SDL makes a text file of the error (I think) in the folder with the .exe, so check there.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement