Advertisement Jump to content
Sign in to follow this  
bmarci

Debug -/ Release Differences

This topic is 1834 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,

I'm just trying out bullet, and noticed that the "visual result" is different for debug and release.

Is that possible? Or am I missing something?

Very simple scenario, 4 boxes fall on top of each other.

 

Share this post


Link to post
Share on other sites
Advertisement

Hi,

I'm just trying out bullet, and noticed that the "visual result" is different for debug and release.

Is that possible? Or am I missing something?

Very simple scenario, 4 boxes fall on top of each other.

 

It's quite possible that Release has something like -ffast-math enabled (or differing /fp flags in Visual C++) while Debug does not.  This would cause the mathematical results of some floating-point calculations to differ a bit.

Share this post


Link to post
Share on other sites

If you are using Visual C++ there might also be differences in release builds because of uninitialized variables. In Debug, the Visual C++ run-time initializes all variables to some different pre-defined values depending on their life-cycle (uninitialized, freed, deleted etc). In release builds you won't get these initializations which may result in different behaviour in your program if you use these variables when they are in these invalid states.

 

If you are using simulation code depending on frame timings you may also get different result because of speed differences between Debug and Release.

Share this post


Link to post
Share on other sites


It's quite possible that Release has something like -ffast-math enabled (or differing /fp flags in Visual C++) while Debug does not.  This would cause the mathematical results of some floating-point calculations to differ a bit.

Yes, that must be it, thanks:)

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!