Unhandled exception at 0x523d14cf (msvcr100d.dll)?

0

Unhandled exception at 0x523d14cf (msvcr100d.dll) in IntellitracTCPIP.exe: 0xC0000005: Access violation reading location 0x00000008.

what can cause this error? and how to solve it

c++
asked on Stack Overflow Nov 22, 2010 by Bart • edited Nov 22, 2010 by John Kugelman

2 Answers

4

The address you're attempting to read suggests that you have a struct consisting of a number of 4-byte integers. You have a pointer to that struct type, but that pointer is null. Your program wants to read the third one — the offset of the third integer field would be 8. Add that to the null-pointer address 0, and you get 0x00000008. (It could be a struct of smaller or larger types, or even an array, but my experience tells me 4-byte integers is most likely.)

The error message indicates that the offending line of code belongs to msvcr100d.dll. That's not your code; you have probably passed a null pointer to some C run-time function. That function has assumed you provided a valid pointer and attempted to read the third field of the struct, but since that pointer is not valid, the OS intercepted the read attempt and threw an exception instead.

Find the last line of code in your program before that error occurs. To do that, you can use the call stack to see the chain of function calls that your program made to get to the point it crashed. Go down the list until you find one of your functions. Do you see any pointers? Can you guarantee that they're all valid when you call that function? If not, then are you sure you're supposed to call that function? Either make sure the pointer is valid, or avoid calling the function with null pointers.

answered on Stack Overflow Nov 22, 2010 by Rob Kennedy
0
0xC0000005: Access violation reading location 0x00000008. 

This indicate a bad pointer. No pointers show point to such a low address as 0x00000008. You are not giving enough information on this, try running the program under a debugger.

answered on Stack Overflow Nov 22, 2010 by J-16 SDiZ

User contributions licensed under CC BY-SA 3.0