App Crashes in RELEASE but works fine in DEBUG 
Author Message
 App Crashes in RELEASE but works fine in DEBUG

Hi

Darn, my app works fine in DEBUG mode, but as soon as i compile it as a
RELEASE it crashes.

Anyone got any tips on sorting this sort of problem out ?

Duncan.



Thu, 28 Aug 2003 21:46:08 GMT  
 App Crashes in RELEASE but works fine in DEBUG
Disables optimization :) /Od

--
Best regards! Piter Timkovsky.

Quote:
> Hi

> Darn, my app works fine in DEBUG mode, but as soon as i compile it as a
> RELEASE it crashes.

> Anyone got any tips on sorting this sort of problem out ?

> Duncan.



Thu, 28 Aug 2003 23:20:24 GMT  
 App Crashes in RELEASE but works fine in DEBUG
Also - check for any uninitialized variables.  Variables automatically get
initialized in DEBUG mode (not necessarily to what you want), but not in
release mode.

Don Metzler


Quote:
> Hi

> Darn, my app works fine in DEBUG mode, but as soon as i compile it as a
> RELEASE it crashes.

> Anyone got any tips on sorting this sort of problem out ?

> Duncan.



Fri, 29 Aug 2003 00:48:45 GMT  
 App Crashes in RELEASE but works fine in DEBUG
Hello,
Take a look at the prototype of the message handlers of your customized
messages within your program. They have to be declared this way:

UINT OnMyMessageHandler(WPARAM wParam, LPARAM lParam);

If you don't declare the message handlers this way, your program will crash
in release mode!

Give it a try and if it wasn't the case you're faced with, let me know and
I'll post you other hints. :-)))))

HTH,
Mehdi
--
The best prophet of the future is the past.


Quote:
> Hi

> Darn, my app works fine in DEBUG mode, but as soon as i compile it as a
> RELEASE it crashes.

> Anyone got any tips on sorting this sort of problem out ?

> Duncan.



Fri, 29 Aug 2003 00:18:22 GMT  
 App Crashes in RELEASE but works fine in DEBUG

Quote:
>Darn, my app works fine in DEBUG mode, but as soon as i compile it as a
>RELEASE it crashes.

>Anyone got any tips on sorting this sort of problem out ?

Duncan,

Have you tried debugging your release version to pinpoint the problem?

On the Project menu, click Settings, and then click the C/C++ tab.
In the Category drop-down box, click General.
In the Debug info drop-down box, click Program Database.
On the Link tab, select Generate Debug Info.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Fri, 29 Aug 2003 01:32:03 GMT  
 App Crashes in RELEASE but works fine in DEBUG

Quote:

>Anyone got any tips on sorting this sort of problem out ?

Read this :

www.mooremvp.freeserve.co.uk/Win32/w32tip40.htm

--
Bob Moore [WinSDK MVP]
http://www.mooremvp.freeserve.co.uk/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Do not reply via email unless specifically requested to do so.
Unsolicited email is NOT welcome and will go unanswered.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Fri, 29 Aug 2003 03:10:48 GMT  
 App Crashes in RELEASE but works fine in DEBUG
A couple of references:

Check out John Robbins's MSJ Bugslayer article from April, 1998.

http://msdn.microsoft.com/library/periodic/period98/bugslayer0498.htm

An updated version of Robbins' CrashFinder code is available at:

http://www.wintellect.com/robbins/code.html

Also, check out Joseph Newcomer's essay on Surviving The Release Version.

http://www3.pgh.net/~newcomer/debug_release.htm

TFM3

Note: Spam-resistant e-mail address


Quote:
> Hi

> Darn, my app works fine in DEBUG mode, but as soon as i compile it as a
> RELEASE it crashes.

> Anyone got any tips on sorting this sort of problem out ?

> Duncan.



Fri, 29 Aug 2003 05:04:27 GMT  
 App Crashes in RELEASE but works fine in DEBUG
To all that have contributed so far ...

THANKYOU THANKYOU THANKYOU

I've learn't a lot from that ... everything you've said is true !

Still tidying up a few loose ends, but the app is now running a lot better
under RELEASE.

Thanks once again, and keep up the good HELP.

Duncan


Quote:
> Hi

> Darn, my app works fine in DEBUG mode, but as soon as i compile it as a
> RELEASE it crashes.

> Anyone got any tips on sorting this sort of problem out ?

> Duncan.



Fri, 29 Aug 2003 08:09:57 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. debug works fine but release build crashes.

2. Debug build fine, release crashes unless we link with debug Multi-Threaded library

3. Release versions crashes, debug is fine

4. Program runs fine in debug mode, but crashes in release mode

5. MIDL compiler fails during release mode but works fine in debug mode

6. debug version works fine, but release not.

7. DLL works fine in DEBUG but not in RELEASE mode

8. Debug version program works fine but its release version causes a GP error

9. VC6 Debug Build Works Fine - but Release Build Gives Error

10. DAO 3.60 crashes app that works fine with DAO 3.50

11. OnClose() in MDI Mainframe works fine in debug version but not in release

12. Debug works fine... Release gives me an error

 

 
Powered by phpBB® Forum Software