unhandled exception in someprog.exe (NTDLL.DLL): 0xC0000005: Access
Violation
I do not get any error messages when exiting from the debug version of
the program. Initially I had some memory leakage in the debug output
window but I have already corrected it by deleting away the objects.
Looking up MSDN, access violation means accesing memory that is
illegal....
Why does the message appear only in the release version and not the
debug version? How to correct this bug since it does not appear in the
debug version?
Just in time debugging is enabled but if you view the stack it will
only show the assembly code for the NTDLL.DLL(windows nt dll). No
error messages in the debug ouput of the window.Thread exited with
code 0 no memory leakage warning.
Can anyone help?
Regards
X
"Steve" <ngs...@my-deja.com> wrote in message
news:976e0586.01060...@posting.google.com...
Go to "C++" tab in "Project setting" menu.
Set 'Debug info' to 'Program Database for Edit and Continue'
And then, Go to "Link" tab in "Project setting" menu.
Put check mark on 'Generate Debug info' checkbox.
Forgive my poor english.
Regards
"Steve" <ngs...@my-deja.com> wrote in message
news:976e0586.01060...@posting.google.com...
http://www.cygnus-software.com/papers/release_debugging.html
Karl wrote:
--
.Bruce Dawson, Humongous Entertainment (we're hiring).
http://www.humongous.com/
Send job applications by e-mail, post technical questions
to the newsgroups please. Thanks.
Go to "C++" tab in "Project setting" menu.
Set 'Debug info' to 'Program Database for Edit and Continue'
And then, Go to "Link" tab in "Project setting" menu.
Put check mark on 'Generate Debug info' checkbox.
X, what do you mean by
"Just put in your debug symbols and compile the release build."
What debug symbols to add?
It gets an unhandled exception inside ntdll.dll(windows dll).You can't
possibly debug ntdll.dll since you don't have the source code??Or Can
you?? What can you do other then look through the entire program to
see where memory is not allocated properly?
Regards
See Joseph Newcomer's article at:
http://www.pgh.net/~newcomer/debug_release.htm
"Steve" <ngs...@my-deja.com> wrote in message
news:976e0586.01060...@posting.google.com...
Yea, basically when you get the error and the option of OK |
Cancel, choose cancel. VC++ should open up in Debug mode. Open
up the Variables window if it's not open (ALT+4). Click Context
list, and look for the method/function where it failed.
X
"Steve" <ngs...@my-deja.com> wrote in message
news:976e0586.01060...@posting.google.com...
Then, open up the call stack window and see what function
is calling ntdll.dll. Then think very hard.
It's not easy. Debugging release builds can be very hard.
If you can detect the problem in release builds - perhaps
by using pageheap or BoundsChecker or more agressive
bounds checking of all of your memory accesses or
*something* then maybe you can track it down there.
However, unless you also look at the call stack in the
release build to *see* where it is crashing (and where
doesn't just mean what function, it means the complete
calls tack) then you won't know for sure when you've
fixed it.
If you still can't track it down, maybe you need a
consultant to fix it. I happen to be expert in this area...
Steve wrote:
--
The crash always happen when the exit button of the release version is
pressed.
>
> Then, open up the call stack window and see what function
> is calling ntdll.dll. Then think very hard.
>
> It's not easy. Debugging release builds can be very hard.
If I can see which function or file is calling the ntdll.dll in the
call stack then I would not have a problem narrowing the bug at all.
The problem is the stack only displays two entries and both are from
ntdll.dll.It is a MFC program and it is after the last statement in
the initInstance() function in the winapp in my program that this
errors occurs.I have encountered this error before and is usually due
to some careless mistakes such as those listed in your article.Your
article was quite interesting.(I wasn,t the one writing the program
but I end up debugging it.There has to be a systematic way of
debugging such errors.
>
> If you can detect the problem in release builds - perhaps
> by using pageheap or BoundsChecker or more agressive
> bounds checking of all of your memory accesses or
> *something* then maybe you can track it down there.
Any freeware or shareware available and how are they used?? What is
microsoft spy that comes with Visual studio? Is it useful for this
sort of problem?
>
> However, unless you also look at the call stack in the
> release build to *see* where it is crashing (and where
> doesn't just mean what function, it means the complete
> calls tack) then you won't know for sure when you've
> fixed it.
>
> If you still can't track it down, maybe you need a
> consultant to fix it. I happen to be expert in this area...
>
I can't afford one.:->
"Steve" <ngs...@my-deja.com> wrote in message
news:976e0586.0106...@posting.google.com...
http://support.microsoft.com/support/kb/articles/Q264/4/71.asp?SD=MSDN
Also, if the crash always happens when the exit button is pressed,
put a breakpoint in the code that gets called then and step forward
watching for the crash.
Also, try to narrow down what it is that makes this happen on the
release build but not the debug build. If you disable optimizations
and the problem still happens then you know that optimizations are
not related to the problem, and you can debug far more easily
(debugging optimized code is a royal pain).
You can also try simplifying your program until the problem goes
away. Binary search. If your program just starts and then immediately
exits does the crash happen? What happens if you do this after
carefully removing half of your application specific code. Repeat as
needed.
Steve wrote:
--