Jump to content
  • Advertisement
Sign in to follow this  
CrimsonMemory

SDL: Program works in Debug config, but fails in Release

This topic is 4449 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

This has never happened to me before: my program runs just perfectly in the debug config, but when I set it to Release config (yes, I put all the settings to match those of SDL, like the multi-threaded DLL and stuff like that), it runs much differently! Let me try to explain. My program is simply a sprite on the screen that moves along with the arrow keys, and when an arrow key is being pushed, the sprite animates. This works correctly in debug, but when I run it in Release, the sprite moves around with the keys, but it doesn't animate! It's so weird that everything works perfectly fine except for that nuance. Really, I'm not sure what kind of source code to give you, because this is such an unusual problem; none of the code is wrong, because it works under Debug, but Release just doesn't like it! Honestly, I don't know the first place to look in my code! I'm honestly thinking of just posting ALL of my code, but that seems immoral. So, has ANYONE ever encountered this sort of situation (that is, the disagreement between Debug and Release configs)? If so, are there any factors I should look into that most often contribute to this sort of problem? I really don't want to resort to posting the entirety of my code (which isn't really all THAT much), but if nobody has run into a problem of this sort before, and it's necessary to post it, I will. PLEASE, just ask, if that's the case. I apologize for all that reading you had to do, so THANK YOU just for reading of my plight, and then thanks in advance for any help I can get out of this. It would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
I believe the biggest issue Debug->Release is uninitialized variables.

Check for those as the debug version can set them to safe values. The release goes for speed and will just allow you to have uninitialized variables.

Share this post


Link to post
Share on other sites
Boder, that was it! I was stupidly referencing a few class members that had never been initialized! Wow, what a freakin' relief. Thanks a LOT for the help!

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!