views:

126

answers:

2

I have a large C++ application running in a Win32 and a x64 Version (using Windows XP x64). When debugging the x64 Version, after each code change the first debug session i start stops with

Unhandled exception at 0x77ee5f3c in myapp.exe: 0xC0000005: Access violation writing location 0x0000000000030c90.

The callstack shows endless recursive calls in ntdll:

ntdll.dll!0000000077ee5f46()  
ntdll.dll!0000000077ef31ed()  
ntdll.dll!0000000077efbc0b()  
ntdll.dll!0000000077f2539e()  
ntdll.dll!0000000077ee5f46()  
ntdll.dll!0000000077ef31ed() 
 etc.

When after this i choose "Stop Debugging" and then "Start Debugging" usually everything is fine and the problem does not occur again until i compile some code and link or if i restart Visual Studio.

+1  A: 

The addresses you listed are 32 bit addresses. This suggests that VS is trying to use its 64-bit debugger on a 32-bit process.

Possibly you have a mixture of 'Win32', 'x64', and 'Any CPU' build platforms in your solution. Make sure your 'active build platform' is consistently defined. The .net stuff claims 'any cpu' on the surface, underneath it has some affinities for 32-bit operation.

Turning off 'Edit and Continue' debugging seems to help this kind of thing too.

Marsh Ray
Turning off "Edit and Continue' seems to reduce the frequency of the problem, but its not gone. I dont use .NET but plain Win32. The selected target machine is /MACHINE:X64.
RED SOFT ADAIR
A: 

Good call! It worked for me.

THANKS wise guy/girl

Ray