Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Cor

Program crashes in release, not in debug...

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

I have a project I''m working on, and at the moment it works fine in debug mode. This is using MSVC5 if that matters, on Win98. There aren''t any apparent issues. When I build a release version however it crashes. In the past this has been because of memory things that have been covered up by being in debug mode but here I''m at a loss. I had to do some detective work even though I rebuilt it with debug and program database information, because it was crashing somewhere outside of the program and I finally came to the line that causes it. fread(&hdr, sizeof(tgaheader), 1, fp); hdr is a tga header structure, declared in the function as such tgaheader hdr; fp is the file pointer and is checked for validity prior to this. If I comment that line out, the program does not crash. If anyone has any thoughts, feel free to offer any suggestions. Thanks

Share this post


Link to post
Share on other sites
Advertisement
If it is not crashing in debug but it is in final, then you are probably overwriting memory with your fread. Make sure what you''re reading into has enough room for the info.

Share this post


Link to post
Share on other sites

  • 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!