468,754 Members | 1,332 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,754 developers. It's quick & easy.

0xC0000005: Access violation reading location 0x513112f4


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

--
bhreddy
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Mar 27 '06 #1
2 9196
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/]


Mar 27 '06 #2
>> 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
br**********************@hotmail.com
Remove only "_nos_pam"
Mar 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by batista | last post: by
2 posts views Thread by =?Utf-8?B?c29jYXRvYQ==?= | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.