Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / fputs() Causes Release Build Crash

Author
Message
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 2nd Jul 2008 07:51 Edited at: 2nd Jul 2008 08:00
I have a typedef setup like this:

Using this def, I initialize "player currentPlayer;". The various attributes are set. Later on in the game, I wish to export this to a text document for debugging purposes. Here's what I did:

When run in release mode, this code halts, with VC++ giving the following error:

Break/Continue buttons on a message box containing this error are presented. If I hit continue, the same unhandled exception occurs.

When building in debug mode, this exception isn't present, however a buffer overrun is reported when the application closes, which I've traced back to using strcmp().

*EDIT: The buffer overrun was NOT caused by strcmp(), and I do not know what is causing it. Full source available if necessary.

**FIX: Problem resolved. Related to buffering string 'szTemp'. By initializing the string globally before all includes, all issues were resolved. Although technically it should not have been a problem, this is a solid fix.


My site, for various stuff that I make.

Login to post a reply

Server time is: 2024-09-30 01:28:37
Your offset time is: 2024-09-30 01:28:37