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 / DGK > MSVisual c++ 8 Express, Realease vs Debug Differances

Author
Message
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 9th Aug 2011 22:19
?) I have been working a game for a while. Using the MS Visual Studio 8 Express. Works fine in Debug but when I tried to make a release version the game locks and crash's. The Debug file size is 2.8meg while the Release version is .9meg just wondering if others have had a similar issue.

There are many answers but just one question" ~ Jerilith the Mad
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 9th Aug 2011 23:24
Normally this happens when using vector, list or other of the STD libs. Fixed by going to your projects properties -> Configuration Properties -> C/C++ -> Code Generation and set the debug library from /MTd to just /MT... Hope that is all you'll need to fix it...

Warning! May contain Nuts!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 9th Aug 2011 23:50
I believe it's set to MT by default in release configuration, but it can be checked.

The size difference is normal, the release build should be smaller.

There must be something in the code that makes it crash. Try to narrow down at least where it crashes, e.g. put message boxes or screen prints into it, to see how far it gets before crashing. Check for obvious problems like uninitialized variables (memory content can be different in release version). If the program loads media, check if it can find all the files it needs (different working directory?). Those are the things that first come to mind.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 19th Aug 2011 09:46
Sorry about the lack of a reply, first time I have had for a while since posting.

"There must be something in the code that makes it crash. Try to narrow down at least where it crashes, e.g. put message boxes or screen prints into it, to see how far it gets before crashing. Check for obvious problems like uninitialized variables (memory content can be different in release version). If the program loads media, check if it can find all the files it needs (different working directory?). Those are the things that first come to mind. " - Mireben

Usually I catch those types of errors when I run in debug mode, the computer don't like the code. I hit those barriors and the program crash's. Correct and the recompile then it works. But then why in a Release version does the program crash?. The program crash's when it starts loading the media and setting up the class objectives. Earily stages. That much I know.

"Normally this happens when using vector, list or other of the STD libs. Fixed by going to your projects properties -> Configuration Properties -> C/C++ -> Code Generation and set the debug library from /MTd to just /MT... Hope that is all you'll need to fix it..." -Wlgfx

As for the setting on the compilier WLGfx, I don't see those options. This is what I got for properties on my project. See attached image

There are many answers but just one question" ~ Jerilith the Mad

Attachments

Login to view attachments
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 19th Aug 2011 09:54
Just found the Project Options, they where not there a moment ago... Trying that fix

There are many answers but just one question" ~ Jerilith the Mad
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 19th Aug 2011 10:01
No change. Found the Multi Thread /MT function.. I have also had some issues with Windows 7 not wanting to do a few things, such as screen grabs such as grabing a image off of the screen slapping it into a bit map then copying that bit map onto a sprite.. I am wondering if I am running into a similar issue. Something that the Debug has access to that the Release version does not...

There are many answers but just one question" ~ Jerilith the Mad
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 19th Aug 2011 11:38
Okay Started adding manual break points... It is interesting how the Debug version runs vrs. the Release version. After I started adding the break points the program pushed passed the point it was crashing, I have no idea why, there was no real change to the varibles. More poking.. thanks for you help...

There are many answers but just one question" ~ Jerilith the Mad
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 19th Aug 2011 17:58
I've missed this for a while... Looks like you're getting somewhere. Just let us know if anything else crops up...

Warning! May contain Nuts!
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 20th Aug 2011 02:11
A (small) amount of code that you can share which can reproduce this error would be invaluable.

Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 28th Aug 2011 09:42
That's just it. I really did not change anything. I added a few debug comments and the code started to compile. The error would be pushed further down the code path - point. I have gotten towards where I the game starts to load up other data.. passed the media now. Message system works. There are a few break points in which the code is can cause a crash, will install a few more checks at points where the crash is occurring. The code is rather large short of shipping the whole game out.... Which is almost at a playable alpha stage

The Debug version works fine no errors, the Release version hits a error at a point. The game is trying to refrence a arrayed structure that has a value of -1, which does not exsit. That is a number I put in for part of the error. It's just finding that point, what's generating that in the Release version is the catchy point.

It like a puzzel box, you see the picture, but when you put the puzzel together it seams to be missing a few peices.. Well back to decoding, recoding my forever project. Thanks for you help.

There are many answers but just one question" ~ Jerilith the Mad
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 28th Aug 2011 10:22 Edited at: 28th Aug 2011 10:23
Quote: "That's just it. I really did not change anything."


With C++, you can have a bug that only manifests itself "sometimes". It can be as simple as being 1-off in an array but everything doesn't start crashing until much later.

You have to narrow it down to something you can duplicate and post.

Login to post a reply

Server time is: 2024-10-02 19:27:38
Your offset time is: 2024-10-02 19:27:38