Discussion:
VS 2008 Debugger Causes Exception on Win 7 x64
(too old to reply)
Owen Wengerd
2009-10-06 00:01:01 UTC
Permalink
I have a problem with the debugger in VS 2008 Pro SP1 on Windows 7 Pro 64-bit
RTM. The problem occurs only when debugging an x86 executable (native C++).

I can set breakpoints, and the debugger stops at the breakpoint as expected.
If I press F5, the code executes without any problems. However, if I single
step from the breakpoint (either F10 or F11), I get an access violation
exception (0xC0000005: Access violation reading location 0xNN, where NN
points to unallocated memory). The exception occurs regardless of the
instruction at the IP (i.e. even if it's an instruction that doesn't access
memory), so it's apparently caused by the debugger while placing the single
step breakpoint.

I've noticed that the problem occurs only *after* a window has been created
in the process. I can single step through the startup code without any
problems, but if I display a message box (or create my application window),
then any single stepping immediately triggers the exception. I can reproduce
the problem consistently in multiple existing projects.

I've applied SP1, and I believe all the remote debugger patches are applied.
What's going on?
--
Owen Wengerd
Scot T Brennecke
2009-10-06 05:54:54 UTC
Permalink
Post by Owen Wengerd
I have a problem with the debugger in VS 2008 Pro SP1 on Windows 7 Pro 64-bit
RTM. The problem occurs only when debugging an x86 executable (native C++).
I can set breakpoints, and the debugger stops at the breakpoint as expected.
If I press F5, the code executes without any problems. However, if I single
step from the breakpoint (either F10 or F11), I get an access violation
exception (0xC0000005: Access violation reading location 0xNN, where NN
points to unallocated memory). The exception occurs regardless of the
instruction at the IP (i.e. even if it's an instruction that doesn't access
memory), so it's apparently caused by the debugger while placing the single
step breakpoint.
I've noticed that the problem occurs only *after* a window has been created
in the process. I can single step through the startup code without any
problems, but if I display a message box (or create my application window),
then any single stepping immediately triggers the exception. I can reproduce
the problem consistently in multiple existing projects.
I've applied SP1, and I believe all the remote debugger patches are applied.
What's going on?
This has all the signs of being a bug. Have you tried reporting it on the Connect site yet?
Owen Wengerd
2009-10-06 14:22:01 UTC
Permalink
Post by Scot T Brennecke
This has all the signs of being a bug. Have you tried reporting it
on the Connect site yet?
No, I haven't. My next step is to contact MS support.
--
Owen Wengerd
Jochen Kalmbach [MVP]
2009-10-06 06:17:37 UTC
Permalink
Hi Owen!
Post by Owen Wengerd
I have a problem with the debugger in VS 2008 Pro SP1 on Windows 7 Pro 64-bit
RTM. The problem occurs only when debugging an x86 executable (native C++).
Maybe some of the debugger hotfixes can help, see:
http://blog.kalmbach-software.de/2008/04/30/available-hotfixes-for-vc2005-sp1-vc2008-rtm/
--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Owen Wengerd
2009-10-06 14:24:02 UTC
Permalink
Thanks Jochen, I'll go through your list to make sure I have them all.
--
Owen Wengerd
Owen Wengerd
2009-10-06 22:32:01 UTC
Permalink
I've verified that all the listed hotfixes are installed (and I installed
them again, just to be sure), but the problem persists. :/
--
Owen Wengerd
gmit
2009-10-18 20:47:37 UTC
Permalink
  I've verified that all the listed hotfixes are installed (and I installed
them again, just to be sure), but the problem persists. :/
Hello. I have exactly the same problem at my place. Have you managed
to find a solution?

Loading...