Click to See Complete Forum and Search --> : Urgent:Access Violation when run outside the debugger
prabha vencat
May 25th, 1999, 02:01 AM
I have an application built in debug mode(VC++ 5.0). It executes fine when run through the debugger. But when i run it outside the debugger i get an access violation error in ODBC32.DLL. The same happens when i run the release version of the application.
How to debug this ???
I have all the necessary exceptions catched in my application.
Paul McKenzie
May 25th, 1999, 05:55 AM
There seems to be a lot of posts here that sound like yours: "Application works in debug mode, but fails in release. What do I do?".
Here goes...
To debug a release build, go to the Project | Setings | C++ tab for the release build and select "Program Database" for Debug Info. Also go to the Link tab and select "Include debug info". You will then be able to use the debugger with the release version of the application.
Regards,
Paul McKenzie
prabha vencat
May 25th, 1999, 11:55 AM
Hi,
I tried this earlier. But my problem is slightly different. It works perfectly in both modes when run thru' the debugger.
Thanks.
P.V
I think the suggestion is to run the release version of the program without
the debugger and then when the Access Violation occurs and the message box
prompts for 'Debug', you can click that button and all the debug info will
be present for the debugger to now deal with.
sally
May 28th, 1999, 02:05 AM
There seems to be a lot of posts here that sound like yours: "Application works in debug mode, but fails in release. What do I do?".
Here goes...
Make sure all message functions are declared with BOTH WPARAM and LPARAM, even if you don't use them both. Remember that the proper function prototype is OnXXX( WPARAM wparam, LPARAM lparam ) and if your function is not declared like that, your program will "crash" when the system tries to pop the stack and tries to go on executing.
This seems to be a normal problem and the only reason it works in Debug mode is pure luck...
Sally
Sally
May 28th, 1999, 02:05 AM
There seems to be a lot of posts here that sound like yours: "Application works in debug mode, but fails in release. What do I do?".
Here goes...
Make sure all message functions are declared with BOTH WPARAM and LPARAM, even if you don't use them both. Remember that the proper function prototype is OnXXX( WPARAM wparam, LPARAM lparam ) and if your function is not declared like that, your program will "crash" when the system tries to pop the stack and tries to go on executing.
This seems to be a normal problem and the only reason it works in Debug mode is pure luck...
Sally
sally
May 28th, 1999, 02:07 AM
Are you using threads? is ODBC thread safe?
Sally
Sally
May 28th, 1999, 02:07 AM
Are you using threads? is ODBC thread safe?
Sally
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.