Re: Access violation before startup in debug mode
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Tue, 12 Feb 2008 16:30:10 -0500
Actually, any illusion that it is "running" in release mode is probably just that: an
illusion. The point being that the debug mode detects what has broken, but the release
mode merrily uses bad data.
The most common form of this problem is in static initializers, but in fact if you enter
the debugger, it should ideally give you a traceback from NTDLL.DLL (alas, sometimes it
doesn't, which leads to sometimes single-stepping through assembly code in fascinating
ways to get an intact stack to show the traceback).
Start execution not with F5/run in debug mode but with F10/single step. If you get to
WinMain, the problem has not yet happened in the static initializers. Then start
single-stepping until it blows up. This will usually lead to useful information.
joe
On Tue, 12 Feb 2008 11:42:23 -0800 (PST), Rob Richardson <CedricCicada@xxxxxxxxx> wrote:
Greetings!Joseph M. Newcomer [MVP]
I have an MFC application that will run in release mode, but in debug
mode I get an access violation before the program starts. The only
error message is "Unhandled exception in ModelTest.exe (NTDLL.DLL):
0xC0000005: Access Violation." It doesn't give me any indication of
where the instruction is that raised the error. I put breakpoints at
the top of my InitInstance() method and on the line containing the
opening brace of my application constructor class, and neither
breakpoint is hit.
I also have an ActiveX control that does the same thing. When I try
running it in debug mode, it gives me an access violation
immediately.
Does anyone have any idea what might be causing this?
Thanks very much!
RobR
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Access violation before startup in debug mode
- From: Rob Richardson
- Access violation before startup in debug mode
- Prev by Date: Re: Access violation before startup in debug mode
- Next by Date: Re: Access violation before startup in debug mode
- Previous by thread: Re: Access violation before startup in debug mode
- Next by thread: Re: Access violation before startup in debug mode
- Index(es):
Relevant Pages
|