Jump to content
  • Advertisement
Sign in to follow this  
GutyGu

[SDL] Programs close so fast

This topic is 4513 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Thank u! it was a uninitialized variable that was breaking my head. It works now :)

See you and thank u again!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!