Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Unable to Debug tests in Visual Studio 2015
Furynation
#1 Posted : Thursday, July 30, 2015 11:38:14 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/30/2015(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Hi,

I upgraded to Visual Studio 2015 yesterday and I am unable to debug any tests using NCrunch now. A dialog pops up during the debug session that state's "The debugger's workiger process (msvsmon.exe) unexpectedly exited. Debugging will be aborted".

I can debug my application normally without issues. My setup is Visual Studio 2015 Enterprise on Windows 10 with applications on .NET 4.5. I captured a mini dump and have pasted it here (apologies for the wall of text). If I debug the tests in Visual Studio 2013, they work fine.


Microsoft (R) Windows Debugger Version 6.3.9600.17336 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [E:\AppDumps\msvsmon.exe.23360.dmp]
WARNING: Minidump contains unknown stream type 0x15
WARNING: Minidump contains unknown stream type 0x16
User Mini Dump File: Only registers, stack and portions of memory are available


************* Symbol Path validation summary **************
Response Time (ms) Location
Deferred symsrv*symsrv.dll*c:\debug symbols*http://msdl.microsoft.com/download/symbols
Symbol search path is: symsrv*symsrv.dll*c:\debug symbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows 8 Version 10240 MP (8 procs) Free x64
Product: WinNt, suite: SingleUserTS
Built by: 10.0.10240.16384 (th1.150709-1700)
Machine Name:
Debug session time: Thu Jul 30 06:24:58.000 2015 (UTC - 5:00)
System Uptime: not available
Process Uptime: 0 days 0:00:37.000
................................................................
....
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(5b40.3cfc): CLR exception - code e0434352 (first/second chance not available)
ntdll!NtWaitForMultipleObjects+0xa:
00007ff8`3d553afa c3 ret
0:004> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************

*** ERROR: Symbol file could not be found. Defaulted to export symbols for vsdebugeng.impl.DLL -
*** The OS name list needs to be updated! Unknown Windows version: 10.0 ***

FAULTING_IP:
KERNELBASE!RaiseException+68
00007ff8`39fba1c8 488b8c24c0000000 mov rcx,qword ptr [rsp+0C0h]

EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 00007ff839fba1c8 (KERNELBASE!RaiseException+0x0000000000000068)
ExceptionCode: e0434352 (CLR exception)
ExceptionFlags: 00000001
NumberParameters: 5
Parameter[0]: ffffffff80131516
Parameter[1]: 0000000000000000
Parameter[2]: 0000000000000000
Parameter[3]: 0000000000000000
Parameter[4]: 00007ff82f500000

CONTEXT: 0000000000000000 -- (.cxr 0x0;r)
rax=0000007434a80000 rbx=0000000000000003 rcx=0000007434a80000
rdx=0000000000000000 rsi=0000000000000000 rdi=0000000000000003
rip=00007ff83d553afa rsp=000000743465f0b8 rbp=0000000000000001
r8=0000000000001000 r9=0000000000000000 r10=0000000000000040
r11=0000000000000286 r12=00000000ffffffff r13=000000743465f928
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up ei pl zr na po nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
ntdll!NtWaitForMultipleObjects+0xa:
00007ff8`3d553afa c3 ret

DEFAULT_BUCKET_ID: WRONG_SYMBOLS

PROCESS_NAME: msvsmon.exe

ERROR_CODE: (NTSTATUS) 0xe0434352 - <Unable to get error code text>

EXCEPTION_CODE: (NTSTATUS) 0xe0434352 - <Unable to get error code text>

EXCEPTION_PARAMETER1: ffffffff80131516

EXCEPTION_PARAMETER2: 0000000000000000

EXCEPTION_PARAMETER3: 0000000000000000

EXCEPTION_PARAMETER4: 0

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

APP: msvsmon.exe

ANALYSIS_VERSION: 6.3.9600.17336 (debuggers(dbg).150226-1500) amd64fre

MANAGED_STACK: !dumpstack -EE
No export dumpstack found

PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS

BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS_CLR_EXCEPTION

LAST_CONTROL_TRANSFER: from 00007ff82f664251 to 00007ff839fba1c8

STACK_TEXT:
00000074`34a2c7f0 00007ff8`2f664251 : 00000000`00000001 00000074`34a2c898 00000074`36375f28 00007ff8`2fbb34b8 : KERNELBASE!RaiseException+0x68
00000074`34a2c8d0 00007ff8`2f66404f : 00000074`00000050 00007ff8`2f503144 00000074`36375da8 00000074`361f8680 : clr!RaiseTheExceptionInternalOnly+0x33b
00000074`34a2c9d0 00007ff8`2f103590 : 00000074`36375ef0 00000074`36375f28 00000074`4e47d588 00007ff8`2e922d2a : clr!IL_Throw+0x184
00000074`34a2cb80 00007ff7`d020b821 : 00000074`4e329300 00000000`008a0073 00000000`00000086 00000000`00000028 : mscorlib_ni+0x1233590
00000074`34a2cbb0 00007ff7`d0204b37 : 00000074`36375ed0 00000000`00000008 00000000`ffffffff 00000000`00000034 : 0x00007ff7`d020b821
00000074`34a2e420 00007ff7`d020451b : 00000074`36375c38 00007ff7`d0080a70 00000000`0000005f 00000000`00000003 : 0x00007ff7`d0204b37
00000074`34a2e450 00007ff7`d020435c : 00000074`361f8680 00000074`36365bb0 00000074`36375ca8 00000074`36375388 : 0x00007ff7`d020451b
00000074`34a2e4c0 00007ff7`d02042b7 : 00000074`361f8680 00000074`36365bb0 00000074`36375388 00000074`36375c38 : 0x00007ff7`d020435c
00000074`34a2e520 00007ff7`d01547a1 : 00000074`36369dd8 00000074`36375c68 00000000`0000005f 00000000`00000003 : 0x00007ff7`d02042b7
00000074`34a2e560 00007ff7`d0153666 : 00000074`36369768 00000000`0000003b 00000000`00000001 00000000`00000034 : 0x00007ff7`d01547a1
00000074`34a2e5c0 00007ff7`d0149a87 : 00000074`34a2e600 00000074`36368228 00000074`36368228 00000074`36369718 : 0x00007ff7`d0153666
00000074`34a2e620 00007ff7`d0148920 : 00000074`36369dd8 00000074`36368228 00000074`3622de80 00007ff7`d0145953 : 0x00007ff7`d0149a87
00000074`34a2e670 00007ff7`d0148777 : 00000074`36369718 00007ff7`d0144fec 00000074`36365bb0 00007ff7`d0144333 : 0x00007ff7`d0148920
00000074`34a2e6c0 00007ff7`d0142aee : 00000000`00000028 00000074`34a2e7b0 00000000`00000001 00000074`36368228 : 0x00007ff7`d0148777
00000074`34a2e730 00007ff7`d01ff9c9 : 00000074`36365bb0 00000074`36368228 00000074`36369718 00000000`00000001 : 0x00007ff7`d0142aee
00000074`34a2e7c0 00007ff7`d015611c : 00000074`36365dd0 00000000`00000000 00000000`00000028 00000000`0a000048 : 0x00007ff7`d01ff9c9
00000074`34a2e830 00007ff7`d0153754 : 00000074`36365dd0 00000074`34a2e8b8 00000000`00000001 00000000`00000028 : 0x00007ff7`d015611c
00000074`34a2e890 00007ff7`d0149a87 : 00000074`34a2e8d0 00000000`00000000 00000074`362f5800 00000074`36365b90 : 0x00007ff7`d0153754
00000074`34a2e8f0 00007ff7`d0148920 : 00000074`36365dd0 00000000`00000000 00000074`36365b90 00000074`36365b90 : 0x00007ff7`d0149a87
00000074`34a2e940 00007ff7`d0148777 : 00000074`36249390 00007ff7`d0145193 00000074`3635a0d8 00000074`36365bb0 : 0x00007ff7`d0148920
00000074`34a2e990 00007ff7`d0142aee : 00000074`361f8610 00000074`36365bb0 00000074`362f5800 00000074`36365b90 : 0x00007ff7`d0148777
00000074`34a2ea00 00007ff7`d01f24b7 : 00000074`36365bb0 00000074`362f5800 00000074`36365b90 00000000`00000265 : 0x00007ff7`d0142aee
00000074`34a2ea90 00007ff7`d01f1f70 : 00000074`362062f8 00000074`363658c0 00000074`3635b348 00007ff7`d01b2d48 : 0x00007ff7`d01f24b7
00000074`34a2eb40 00007ff7`d01f1d27 : 00000074`361ed098 00000074`3635c6f0 00000074`363658c0 00000074`36365880 : 0x00007ff7`d01f1f70
00000074`34a2eba0 00007ff7`cfee4cdb : 00000074`361e39a0 00000074`34826f80 00000074`34fad140 00000074`34faaa60 : 0x00007ff7`d01f1d27
00000074`34a2ec10 00007ff8`2f51f6ae : 00007ff7`d00d9110 00007fff`f22c5a31 00000074`34faaa60 00000000`00000000 : 0x00007ff7`cfee4cdb
00000074`34a2ec80 00007fff`f230943d : 00000000`00000000 00000074`34fad140 00000000`00000000 00000074`34827010 : clr!UMThunkStub+0x6e
00000074`34a2ed10 00007ff7`d00600de : 00000074`34faaa60 00000074`34a2eea8 00000074`34fad140 00000000`00000000 : VSDebugEng!dispatcher::Evaluation::ClrCompilation::DkmClrValue::EvaluateToString+0xa1
00000074`34a2edb0 00007ff7`d01f1bb6 : 00000000`00000000 00000074`363657e0 00000074`36365268 00000074`36249390 : 0x00007ff7`d00600de
00000074`34a2ee70 00007ff7`d01f1a78 : dd993338`0807c826 a79dfba8`2b203a2f dd993338`0807c826 00007ff7`cff0c3ec : 0x00007ff7`d01f1bb6
00000074`34a2eed0 00007ff7`d01f1706 : 00007ff7`d01b83c0 00000074`363652c8 00000074`34a2f010 00000074`3635c6f0 : 0x00007ff7`d01f1a78
00000074`34a2ef80 00007ff7`d01f155f : 00000074`34fabce0 00000074`34a2f010 00000074`3482ab80 00000074`34a2ee68 : 0x00007ff7`d01f1706
00000074`34a2efb0 00007ff7`cfeeb326 : 00000000`00000000 ffffffff`fffffffe 00000000`00000000 00007fff`f22b1da1 : 0x00007ff7`d01f155f
00000074`34a2f020 00007ff8`2f51f6ae : 00000074`34810cd0 00007ff8`2f51f655 00000000`00000000 00007fff`f22c5a31 : 0x00007ff7`cfeeb326
00000074`34a2f0a0 00007fff`f231d686 : 00000074`3482ab80 00000074`34fad140 00000074`34fabce0 00000074`3482abb0 : clr!UMThunkStub+0x6e
00000074`34a2f140 00007ff7`d01f1414 : 00000074`34fabce0 00000074`34a2f2e8 00000074`34fad140 00007fff`f2455df0 : VSDebugEng!dispatcher::Evaluation::ClrCompilation::DkmClrValue::GetValueString+0xbe
00000074`34a2f1f0 00007ff7`d01f128c : 00000074`34a2f2d0 00000074`36365130 00000074`34a2f310 00007ff7`d016d145 : 0x00007ff7`d01f1414
00000074`34a2f2b0 00007ff7`d01f114c : 00007ff7`d0235808 00007ff7`d016e409 00000074`34a2f350 00000000`00000000 : 0x00007ff7`d01f128c
00000074`34a2f320 00007ff7`d01f0e24 : 00000074`3635d328 00007ff7`d016d16c 00000074`36363220 00000074`3635d2f8 : 0x00007ff7`d01f114c
00000074`34a2f3f0 00007ff7`d0169839 : a102a34f`c0003f90 11d307c6`3f5162f8 a102a34f`c0005390 00000074`34a2f588 : 0x00007ff7`d01f0e24
00000074`34a2f490 00007ff7`d0168bad : 00000000`00000000 00007fff`f2455e10 00007ff7`d01b83c0 00000000`00000000 : 0x00007ff7`d0169839
00000074`34a2f5f0 00007ff7`d0167664 : 00000074`34f9f550 00000074`34a2f750 00000074`3482b420 00000074`34fdf0b0 : 0x00007ff7`d0168bad
00000074`34a2f680 00007ff7`cfeee664 : 00000000`00000000 00000074`4e45cc70 00000074`32740000 00007ff8`3d4eaa68 : 0x00007ff7`d0167664
00000074`34a2f760 00007ff8`2f51f6ae : 00000074`4e458950 00000074`34a2f8c0 00000074`34f9f5b8 00007ff8`3571f85b : 0x00007ff7`cfeee664
00000074`34a2f800 00007fff`f231f9a9 : 00000074`3482b420 00000074`34fad140 00000074`34f9f550 00007fff`f22c5a31 : clr!UMThunkStub+0x6e
00000074`34a2f8c0 00007fff`f234ae5d : 00000074`34a2fa10 00000074`34f9f550 00000074`34f9f580 00007fff`f22b1b07 : VSDebugEng!dispatcher::XapiEvaluationWorkListItem::Invoke+0x61
00000074`34a2f920 00007fff`f234abf5 : 00000074`34f9f550 00000074`34a2fa10 00000074`34fab760 00000000`00000000 : VSDebugEng!dispatcher::DkmWorkList::Invoke+0x69
00000074`34a2f980 00007fff`f22c6167 : 00000074`34f92100 00000074`34a2fa10 ffffffff`fffffffe 00000074`3275d2e0 : VSDebugEng!dispatcher::XapiInvokeWorkListAsyncTask::ExecuteTask+0xd
00000074`34a2f9b0 00007fff`f22b473a : 00000074`34f92380 00000074`34a2fa10 00000074`34810c50 00000000`00000160 : VSDebugEng!dispatcher::XapiWorkerThread::ProcessAsyncTask+0x1f
00000074`34a2f9f0 00007ff8`3b862d92 : 00000000`00000000 00007fff`f22b33f0 00000000`00000000 00000000`00000000 : VSDebugEng!dispatcher::XapiWorkerThread::ThreadRoutine+0xb1
00000074`34a2fab0 00007ff8`3d4c9f64 : 00007ff8`3b862d70 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000074`34a2fae0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34


STACK_COMMAND: ~4s; .ecxr ; kb

FOLLOWUP_IP:
mscorlib_ni+1233590
00007ff8`2f103590 cc int 3

SYMBOL_STACK_INDEX: 3

SYMBOL_NAME: mscorlib_ni+1233590

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: mscorlib_ni

IMAGE_NAME: mscorlib.ni.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 556bc58d

FAILURE_BUCKET_ID: WRONG_SYMBOLS_e0434352_mscorlib.ni.dll!Unknown

BUCKET_ID: APPLICATION_FAULT_WRONG_SYMBOLS_CLR_EXCEPTION_mscorlib_ni+1233590

ANALYSIS_SOURCE: UM

FAILURE_ID_HASH_STRING: um:wrong_symbols_e0434352_mscorlib.ni.dll!unknown

FAILURE_ID_HASH: {116f111c-1f4a-0eed-3609-dd4e3b5b581c}

Followup: MachineOwner
---------
Remco
#2 Posted : Thursday, July 30, 2015 12:07:13 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Thanks for sharing this issue.

This looks to be an internal issue in the debugger itself.

NCrunch launches the debugger slightly differently to a normal 'F5' run. It will launch the process with the debugger detached, then attach the debugger to the running process before calling in to execute tests.

As far as I know, VS2015 didn't introduce any changes to the automation debugging interfaces. Under normal circumstances, debugging in VS2015 with NCrunch seems to work correctly, so I suspect there is something in your environment or VS installation that is failing.

Do you have any problems attaching your debugger to existing processes on your machine?
Furynation
#3 Posted : Thursday, July 30, 2015 12:14:07 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/30/2015(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Hi Remco,

Thanks for the reply! I don't have any issues attaching to other processes with the debugger. The interesting thing is that tests work fine if I don't debug them.
Furynation
#4 Posted : Thursday, July 30, 2015 3:40:04 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/30/2015(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Remco,

I just tried debugging the same tests using ReSharper's test runner and they worked without crashing the debugger. It appears it's related to NCrunch?
Remco
#5 Posted : Thursday, July 30, 2015 11:19:49 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Can you try the following to see if this makes any difference?

1. Try the issue with a dummy test project with a single test (in a new, blank solution). Do you see the same behaviour?
2. Assuming you do see the crash happen for the above, try changing the project's build platform to x64, then x86. Try the debugger with each of these platforms. Do you see consistent results?
3. Inside your test code, try adding a Thread.Sleep(20000) to cause the test to wait for 20 seconds during its execution and set a breakpoint on a line of code after this. Run the test using NCrunch without the debugger. Using VS, try attaching the debugger onto the test process running the test (if you're not sure which NCrunch.TestHost is running the test, just attach to all of them). Does the debugger hit the breakpoint? Do you see a crash?

I'll be honest here - it's likely to be very hard for me to troubleshoot this problem for you. I haven't been able to reproduce this issue in any test environment that I have access to. With the issue being kicked up far downstream inside the debugger itself, we don't really have much information to work with. I feel like the best we can hope for here is to narrow down the circumstances under which the debugger will fail to launch in order to help you find a workaround. If you haven't already, I strongly recommend uninstalling and reinstalling VS2015 to see if this makes any difference. Also try disabling any virus scanners or security related software to see if this helps. I suspect that something in your environment is either corrupt or inhibited somehow.
Furynation
#6 Posted : Friday, July 31, 2015 12:07:43 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/30/2015(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Hi Remco,

I know the feeling. I tried a sample test project - the tests debugged fine there. I also tried sleeping the thread and attaching the debugger manually and msvsmon still crashed. I'm investigating whether it's something related to specific tests now. Some don't crash, some do. From my testing, it appears that the debugger crashes when my test code hits a line that uses an abstract class. I know that doesn't really make sense, but the tests that repeatedly don't crash are the ones that don't have an abstract subclass under test.

For example if I have public abstract class Animal() { public void Move() }; public class Dog : Animal { }, and my test has var i = 0; i = i + 1; var dog = new Dog(); dog.Move(), the debugger carsshes on the var dog = new Dog() line.

I cannot reproduce this under the dummy solution though. I'm stumped.
Remco
#7 Posted : Friday, July 31, 2015 10:54:45 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
The new .NET framework (v4.6) introduced a number of changes around the JIT and garbage collector. Not all of these changes are yet entirely stable, and a fairly recently discovered one in RyuJIT has been found to do some quite serious stuff with code under x64. Unfortunately, merely installing the new version of this framework will alter all existing framework behaviour.

Are you running under an x64 process? If so, does changing to x86 help at all?
Furynation
#8 Posted : Saturday, August 1, 2015 7:06:13 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/30/2015(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
That makes sense. I've tried running under both x86 and x64 with no luck.
Remco
#9 Posted : Sunday, August 2, 2015 10:22:44 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks. I'm afraid I'm out of ideas for trying to narrow this down. Do let me know if you find a way to consistently reproduce it.
Remco
#10 Posted : Monday, August 10, 2015 8:43:16 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
This reported issue may be relevant - https://github.com/dotnet/coreclr/issues/1350.
Furynation
#11 Posted : Monday, August 10, 2015 11:21:33 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/30/2015(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Thanks Remco. I just filed a bug over at Connect. Hopefully, they'll be able to narrow this down. It started happening now under normal debugging situations.
Remco
#12 Posted : Monday, August 10, 2015 11:24:18 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Furynation;7607 wrote:
Thanks Remco. I just filed a bug over at Connect. Hopefully, they'll be able to narrow this down. It started happening now under normal debugging situations.


I'm sorry to hear that. I recommend sharing a link to your report on connect here, that way if anyone else has the same issue they can help you by upvoting.
Furynation
#13 Posted : Friday, August 14, 2015 11:28:21 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/30/2015(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Here's a link to the connect issue: https://connect.microsof...n-exe-crashing-randomly

It's a bummer, but we will get there. Thanks again for all your help. I appreciate it!
1 user thanked Furynation for this useful post.
Remco on 8/14/2015(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.138 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download