Advertisement

Debug vs. Release - Help!

Started by March 14, 2000 11:12 AM
1 comment, last by Gamera 24 years, 7 months ago
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
mhanna@nyc.rr.com
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.
If a man is talking in the forest, and there is no woman there to hear him, is he still wrong?
Advertisement
Thanks for the quick reply, I''ll take a look when I get home from work!

mhanna@nyc.rr.com
mhanna@nyc.rr.com

This topic is closed to new replies.

Advertisement