0xC0000005: Access violation reading location 0x513112f4

B

bhreddy

Hi All,

Can someone help me out how can I resolve the error "0xC0000005: Access
violation reading location 0x513112f4"?

Steps I followed...
1. I ran the application at DOS prompt
2. After some time my application got crashed and windows popped up a
window asking for debug, send error report.
3. Clicking on Debug opens my workspace in .Net IDE.

But the problem it is directly going into assembly code and not into my
code. I am not able find what statement is causing the error in my
code.

Following is in ths "Call stack" window...
ntdll.dll!7c92ae22()
msvcr71.dll!7c34218a()
test.exe!0041ae9d()
test.exe!0040d4b2()
msvcr71.dll!7c34f744()
test.exe!004114e7()
test.exe!004cd583()
kernel32.dll!7c816d4f()
kernel32.dll!7c8399f3()

test.exe is my application name.

Please help me out to resolve this. How can I take the debugger into my
source code instead of assembly code?

Thanks in advance,

Regards,
Reddy
 
O

Oleg Starodumov

Please help me out to resolve this. How can I take the debugger into my
source code instead of assembly code?

1. Build your application with debug information enabled.

You need the following options:
Compiler: /Zi
Linker: /debug (and also /opt:ref if it is a release build)

All these options can be set in project settings (search for these options in the help
to find the corresponding settings)

2. Configure symbol server on your system.

Set the following environment variable:
_NT_SYMBOL_PATH=srv*c:\symbols*http://msdl.microsoft.com/download/symbols

(you can replace c:\symbols with any valid directory name on your system;
this directory will store symbols downloaded from symbol server in Microsoft)

If you are using VS 2002/2003, it is also necessary to upgrade symsrv.dll
as described here:
http://www.debuginfo.com/tips/symsrvexlist.html

3. The next time you application crashes and you attach debugger to it,
it will either open one of your source files (if the crash occurred in your code),
or you will be able to use Call Stack window to navigate to your functions
higher on the call stack.
Can someone help me out how can I resolve the error "0xC0000005: Access
violation reading location 0x513112f4"?

After you have configured the system to use proper symbols (using the steps
above), you should probably get much more clear picture of the situation.
If the reason of the problem is still unclear, please post here the call stack
again (but this time with good symbols).

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]
 
B

Bruno van Dooren

Please help me out to resolve this. How can I take the debugger into my
source code instead of assembly code?

1. Build your application with debug information enabled.

You need the following options:
Compiler: /Zi
Linker: /debug (and also /opt:ref if it is a release build)

All these options can be set in project settings (search for these options
in the help
to find the corresponding settings)

2. Configure symbol server on your system.

Set the following environment variable:
_NT_SYMBOL_PATH=srv*c:\symbols*http://msdl.microsoft.com/download/symbols

(you can replace c:\symbols with any valid directory name on your system;
this directory will store symbols downloaded from symbol server in
Microsoft)

If you are using VS 2002/2003, it is also necessary to upgrade symsrv.dll
as described here:
http://www.debuginfo.com/tips/symsrvexlist.html

3. The next time you application crashes and you attach debugger to it,
it will either open one of your source files (if the crash occurred in
your code),
or you will be able to use Call Stack window to navigate to your functions
higher on the call stack.
Can someone help me out how can I resolve the error "0xC0000005: Access
violation reading location 0x513112f4"?

After you have configured the system to use proper symbols (using the
steps
above), you should probably get much more clear picture of the situation.
If the reason of the problem is still unclear, please post here the call
stack
again (but this time with good symbols).

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]

Another way (but only of limited use) is to simply start your application
project from inside the VS IDE.
When it crashes it should take you directly to the correct location. If the
code is in your project you can jump to the line of code. If the error is in
an external dll you can use the call stack to see which function in your
code calls the function that caused the exception.

But as I said, that only works if you can reproduce the problem on your
development machine. if not then Oleg's advice is the way to go.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top