Jump to content
  • Advertisement
Sign in to follow this  
eq

Solved: Crashes when run outside the debugger in release builds

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

As the title suggest my application crashes when I execute it outside the debugger. Debug build works inside and outside the debugger environment. Release build works inside the debugger environment. I recall that I've had similar problems before and it's most probably because the debugger uses some other memory manager. I also realize that the most probable cause is an uninitiated variable somewhere in my code (that get's initiated diffrently by the different memory managers). The question is: how do you find a bug like this? I know exactly where the crash happens (after some logging), it's using a variable that all of a sudden turned zero (the exact same variable wasn't zero when it was used several times before). So probably something overwrites the space of the crashing variable with zero!? I've tried tools like DevPartner's Integration Error Detection without any luck :( Any ideas are welcomed! [Edited by - eq on August 17, 2005 7:24:13 AM]

Share this post


Link to post
Share on other sites
Advertisement
Just off the top of my head because I read something random related to what I'm doing.. are you using dynamic_cast? check you've enabled Run-Time Type Information (RTTI) in both your debug and release settings (Project settings under c/c++ | c++ Language)

Without it I get this error when I run a release build.
"MSVC++ Runtime Library - Runtime Error!"

To that end, just check out all the differences in project settings between debug and release versions.

DaveC

Share this post


Link to post
Share on other sites
bobason456: Nope, not using RTTI.
Rasmadrak: !? The cache usage and size should be the same inside the debugger or outside, right?
It's the same .exe without any recompile inbetween.
Kalasjniekof: Exactly what I wrote, the problem is to find which ones...
It's quite a huge project, the .exe is over 6mb.

Share this post


Link to post
Share on other sites
Found the uninitiated variable..
How the **** has this application been working for months without this one hitting me before?!

That's scary =)

Thanks for all suggestions.

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!