|
-
May 25th, 1999, 02:01 AM
#1
Urgent:Access Violation when run outside the debugger
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.
-
May 25th, 1999, 05:55 AM
#2
Re: Urgent:Access Violation when run outside the debugger
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
-
May 25th, 1999, 11:55 AM
#3
Re: Urgent:Access Violation when run outside the debugger
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
-
May 27th, 1999, 07:01 AM
#4
Re: Urgent:Access Violation when run outside the debugger
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.
-
May 28th, 1999, 02:05 AM
#5
Re: Urgent:Access Violation when run outside the debugger
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
-
May 28th, 1999, 02:07 AM
#6
Re: Urgent:Access Violation when run outside the debugger
Are you using threads? is ODBC thread safe?
Sally
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|