0

I am getting the error: Unhandled exception at 0x77d815de in client.exe: 0xC0000005: Access violation reading location 0x00000000.

I understand what the normal access violation error means, but this one keeps repeating itself at location 0x77d815de, as in, I'll delete lines of code in the program, and it breaks at location 0x77d815de, regardless of the line that is. The code I am running is the simple Windows API code, with some additions to the switch statements (which i have tried removing) and a class initialisation (Which again, i have also tried removing). Could you please give me some suggestions on at least why there may be an overflow, or a way to fix this. Thank you for your time.

--

Found it out, it was caused by two switch cases interlocking in a way unnoticable by the compiler, and me. Reverted it to an older form from my repository and it was fine. It caused corrupt data in the DirectX Device class, and screwed up some of the initialisations of it, causing the read exception.

  • 9
    please show the code – Matt Dec 17 '12 at 03:55
  • 3
    There cannot be any suggestions without seeing any code. You ned to show the code. – Alok Save Dec 17 '12 at 03:56
  • 4
    Your addresses are meaningless to us. Well except for the NULL pointer (0x00000000). – drescherjm Dec 17 '12 at 04:00
  • 1
    The top two search results on Google for `0x77d815de` point to this question. The rest (~16 results) is in chinese. – John Dvorak Dec 17 '12 at 04:09
  • Access violation reading location 0x00000000 is trying to access a null pointer. At least when it comes to the visual c++ runtime is concerned. Are you doing the proper error checking? – johnathan Dec 17 '12 at 04:42
  • Whenever you get a crash, such as this, your first reaction should not be to edit the code but to run the program in a debugger. This will help you find the location of the crash, let you see the function callstack, and also let you examine variables. – Some programmer dude Dec 17 '12 at 08:22

1 Answers1

0

I usually see those addresses in ntdll.dll. You are probably providing some bad data to the WinAPI and it's crashing because you are not using it correctly.

If you break into your debugger at this point, you should be shown the call stack. You can go back through it until you reach your own code where you made the call. From there, it should be much easier to find the problem.

paddy
  • 60,864
  • 6
  • 61
  • 103