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

Notification

Icon
Error

NCrunch crashes - can submit crash dmp file?
ccage90
#1 Posted : Tuesday, January 14, 2014 2:33:21 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/14/2014(UTC)
Posts: 5
Location: United States of America

Thanks: 2 times

I've been having a regular crash in NCrunch when running tests. I'll get the WER popup and then see an error like below in my Event Log.

Would I be able to send a crash dmp file to be looked at? Would like to know if this is some issue in our code.

Thanks,
Chris

Faulting application name: nCrunch.TestHost.x86.exe, version: 0.0.0.0, time stamp: 0x5271c49d
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0x00000000
Fault offset: 0x076dbcbe
Faulting process id: 0x1584
Faulting application start time: 0x01cf10b6a99a60fa
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2012\nCrunch.TestHost.x86.exe
Faulting module path: unknown
Report Id: 7cfaab57-7caa-11e3-9c01-b00594f3b45c
Remco
#2 Posted : Tuesday, January 14, 2014 5:20:15 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,982

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Chris -

Unfortunately the dump file probably won't be of much use to me in narrowing down what is happening here. Have you noticed any pattern to the crash? Does it happen if you use NCrunch on another solution?

Something to try is to set the Use hosted task runner configuration setting to FALSE. This will force NCrunch to use only managed code inside the test process, allowing us to rule out whether the crash is being caused by NCrunch's code.

If you haven't already, I recommend trying the new NCrunch V2 beta. This release contains handling for stack overflows which are known to cause problems such as this when they are thrown by code under test. Stack overflows are the leading cause of crash faults in V1 because they result in the entire test process being torn down, making them painful to try and debug.

If you can isolate a test that is consistently causing this problem, I recommend trying to step into the test with a debugger to see if the explosion happens before your test starts executing, or during its execution.


Thanks!

Remco
1 user thanked Remco for this useful post.
ccage90 on 1/14/2014(UTC)
ccage90
#3 Posted : Tuesday, January 14, 2014 4:17:17 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/14/2014(UTC)
Posts: 5
Location: United States of America

Thanks: 2 times
Thanks Remco.

I installed V2 Beta and the same crash happened on the first run of tests. I'm also suspecting Stack Overflow but looks like stack overflow detection is turned on.

For some reason, I can't find the "Use Hosted Task runner" option in configuration. I selected Configuration from the menu in Visual Studio. Then I'm looking under "General Settings". I don't see an option to select "All solutions" as the wiki suggests. Probably just need another cup of coffee.

> You can adjust the global configuration settings by selecting the All Solutions option under the configuration pane (accessible from the top NCrunch menu under Configuration).

Regarding the dump file, these can be opened in Visual studio and sometimes provide useful information as to the state of the app at time of crash.

Thanks,
Chris
Remco
#4 Posted : Tuesday, January 14, 2014 10:28:52 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,982

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks Chris.

The newest version of NCrunch V2, which was released a few hours after I responded to you above, actually has the hosted task runners removed because they were causing problems. If you're still seeing this crash, it's fairly certain that there is no relationship with unmanaged code being executed by NCrunch.

Have you had any luck in narrowing down which test is surfacing the issue? Is it possible for you to step into the test with a debugger?

I'm happy to have a look at the crash dump, but from experience with NCrunch I've found these dumps often show the corrupt state of a process long after the issue has actually appeared, and they do tend to be quite large. If you have a way of sharing it with me, I'm sure it wouldn't hurt to take a look.

Cheers,

Remco
ccage90
#5 Posted : Tuesday, January 14, 2014 11:21:22 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/14/2014(UTC)
Posts: 5
Location: United States of America

Thanks: 2 times


That's the strange thing, the NCrunch output will show "Test Cancelled by user" after I hit the cancel button on the WER reporting to microsoft dialog. Then I'll try running the same test in debugger, and I have no issues.

It looks like the dump file is 18 Mb. Could I send a dropbox link on the contact us form?

Thanks,
Remco
#6 Posted : Tuesday, January 14, 2014 11:31:45 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,982

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
That is very, very strange. The other thing I would suggest is trying to comment out or deduct parts of the code under test to see if you can narrow down what's causing it. Are you executing any unmanaged code with your test?

Unfortunately 18MB is a little too large for the contact form ... this form backs onto a mail server that seems to be struggling with large attachments at the moment. Do you have anywhere else you can store it? Dropbox perhaps?
ccage90
#7 Posted : Wednesday, January 15, 2014 3:20:02 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/14/2014(UTC)
Posts: 5
Location: United States of America

Thanks: 2 times
That's what I was suggesting, a drop box link, not attaching to the form.
Remco
#8 Posted : Wednesday, January 15, 2014 10:17:50 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,982

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Ahh sorry. I just re-read your post and realised I must have been cross-eyed (<facepalm>). A link should be no problem. Drop it through the form and I'll be happy to take a look.
1 user thanked Remco for this useful post.
ccage90 on 1/15/2014(UTC)
ccage90
#9 Posted : Wednesday, January 15, 2014 10:47:09 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/14/2014(UTC)
Posts: 5
Location: United States of America

Thanks: 2 times
Thanks Remco. I finally was able to reproduce a stack overflow (infinite loop) after getting some data from our QA environment.

I guess I can't be sure that the test was hitting this stack overflow error since it wasn't happening on every run. Also, you mentioned the Beta version has new Stack Overflow detection. But, NCrunch has been running smoothly for me today.

I think I will not bother you with the dump file for now.

Thanks for a great product. Really a joy to code with this running in the background.

Remco
#10 Posted : Thursday, January 16, 2014 2:15:42 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,982

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Great to hear! Stack overflows can be a bit of a nightmare to track down in a test environment. I guess this was the perfect storm with an overflow appearing inconsistently. I'm glad you tracked it down.

Because it works using instrumentation, NCrunch's stack overflow detection is limited to only picking up overflows that occur within user code. This means that if the overflow is occurring within libraries you're calling into, NCrunch won't be able to detect it and stop it from ripping the test process apart.

Thanks for enjoying NCrunch :)
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.071 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download