• Advertisement

Archived

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

Debug vs. Release - Help!

This topic is 6554 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 an interesting problem with the release version of a program I wrote ( a tetris clone ). The debug version works fine, but when I run the release executable, some of my GUI elements are not visible. Specifically, I have 3 Pushbuttons ( part of my own DX GUI, this is a full screen DX app ) for Start, End, and Pause. The bitmap files are in the correct directory, and the program should give an error message if the blt fails or the files couldn''t be loaded. What''s even weirder is that the other GUI elements show up fine ( the mouse, labels ). Plus, since I know where the buttons should be, clicking on them still produces the desired affect ( clicking where Start should be starts the game ). Like I said, using the exe of the debug version, everything works fine. If anyone has any ideas what could cause this or if something is unclear, please let me know. Thanks! mhanna@nyc.rr.com

Share this post


Link to post
Share on other sites
Advertisement
Well, it could be a bizzillion different things, but here''s a guess...

A lot of compilers will initialize variables to zero (including memory malloc''d) when you build a debug version of the executable but not the release version. So, it could be that your debug version works because you are not initializing a variable before you use it. Since the compiler does it for you in the debug version, it works, but not intthe release version.

Just a thought.

Share this post


Link to post
Share on other sites
Thanks for the quick reply, I''ll take a look when I get home from work!

mhanna@nyc.rr.com

Share this post


Link to post
Share on other sites

  • Advertisement