简体   繁体   中英

Visual Studio 2013 debug crash

I have a WPF project (C#) that crashes Visual Studio 2013 when I start debugging it. I get a dialog that says [application].exe has triggered a breakpoint. There are option buttons for Break and Continue. If I choose continue Visual Studio crashes. If I choose Break I get to a disassembly breakpoint in Main Thread/_NtWaitForSingleObject@12():

77C60223  ?? ?? 
77C60224  ?? ?? 
77C60225  rol         byte ptr [eax],0  
77C60228  add         byte ptr [ebx+0CC204C4h],al  
77C6022E  add         byte ptr [eax+2B8h],dl  
77C60234  add         byte ptr [ebx],dh  
77C60236  leave  

The break is on the first add instruction at 77C60228.

This is new behavior that didn't start until I installed the Windows 7 SDK and ran WinDbg. WinDbg will still start and run the application, but not Visual Studio. The application runs fine when started normally (except for the bug I'm trying to find). The problem doesn't happen on every project, only the one I tried to debug with WinDbg.

I am trying to learn WinDbg, but I don't want to lose the Visual Studio debugging capability. I'm going crazy with this. Any help is appreciated.


Further to this issue, I upgraded to VS2015 which now does not crash, but instead provides the following:

    Managed Debugging Assistant 'FatalExecutionEngineError' has detected 
a problem in 'C:\Users\sculleb\Documents\Visual Studio 2015
\Projects\GOOSETest\bin\x86\Debug\GOOSETest.exe'.

    Additional information: The runtime has encountered a fatal error. 
The address of the error was at 0x72e31e51, on thread 0x2598. 
The error code is 0xc0000005. 
This error may be a bug in the CLR or in the unsafe or non-verifiable portions
of user code. Common sources of this bug include user marshaling errors for 
COM-interop or PInvoke, which may corrupt the stack.

The application starts normally however when "Start without debugging" is selected.

Issue was caused by registry entries at:

HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options

Not sure where they originated, but most likely WinDbg or Application Verifier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM