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 / Error building in release mode

Author
Message
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 27th Nov 2011 16:55
If I try to compile my program in release mode I get this warning:


If I press yes, I get this:

If I press continue the same message pops back up. If I press break I get this:


Disassembly has a bunch of questionmarks in it. What is going on?
The program works fine when compiled in debug mode.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 27th Nov 2011 17:23
The only time my program crashed in release and not debug turned out to be a simple fence post error. A 'for' loop was doing one too many loops, apparently debug mode reserves extra memory or something.

It may not be your problem but it is not unusual for release to catch a bug that debug mode has not detected.

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 27th Nov 2011 18:02
yes, you could press F10 instead of F5, and move on step by step, so you can find where it crashes, you will probably know why, too, keep an eye on uninitialized variables, arrays (trying to access a non-existing element of an array), etc.

Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 27th Nov 2011 20:55
I don't know what f10 was supposed to do. But i chose 'release' in the dropdown menu and pressed f10 and it showed the same window before anything started happening (just like before) and then the third one. And then I pressed ok, and nothing happened. and I had to press the stop button.
What does that first warning mean, that shows up before it starts? surely it has something to do with it.

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Nov 2011 23:23
Sometimes switching from Debug Mode to Release Mode you have to swap the compile library settings or something. Try this:

Right click on Solution Name -> Properties -> C/C++ -> Code Generation -> Runtime Library - And set to /MT

This stops the compiler from linking the default debug libraries.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 28th Nov 2011 21:10
It was already set to /MT

JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 28th Nov 2011 21:51
The first message is telling you that. You're trying to trace through the code using the debugger but the debugger has no information to work with (ie symbols). Either press ctrl+f5 to run it without debugging or add debug info to the compiled output.

You can do that with one of the compiler switches. I use the debug info only switch, not the edit and continue. You can still debug without most of the debug overhead (memory checks etc) just make sure NDEBUG is defined in the preprocessing directives and not DEBUG.

Hope this helps,

JTK
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 29th Nov 2011 19:56 Edited at: 29th Nov 2011 19:57
If I press ctrl+f5 the game crashes. I didn't understand what you were trying to say, but when you said "add debug info to the compiled output" I copied everything from the debug folder into the release folder and now it works. That was probably a bad idea, eh?

JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 29th Nov 2011 21:57
Yeah, bad idea. When I get home tonight, I'll explain step by step for you since I don't recall the exact setting(s) off hand.

JTK
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 30th Nov 2011 05:02
First, Project->Properties->Configuration Properties->C/C++->General

Set the option Debug Information Format to C7 Compatible.

Next, Project->Properties->Configuration Properties->Linker->Debugging

Set the option Generate Debug Info to Yes


That's it! You do those things and then you should be able to debug the program in RELEASE build.

Let me know if this doesn't do it for you, I still may have missed a step...


JTK
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 30th Nov 2011 18:45
Did that, now the first of the windows doesn't show up anymore. But the second and third one still pop up and it doesn't work. Thanks for all the help so far!

Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 3rd Dec 2011 22:55
Did everybody give up on this problem?

Login to post a reply

Server time is: 2024-11-19 06:40:29
Your offset time is: 2024-11-19 06:40:29