Build/Test Issues

NCrunch Engine crashing

Started by Beaker on 5,973 views

On one project in VS2013 NCrunch suddenly stopped working.
The queue got filled with pending assemblies to build, but just doesn't processs them.
I didn't change any thing to the project, but at first I tried checking requirements of projects not being met.
Restarting VS, the computer, nothing solved it. And NCrunch works on all other projects.

Then I enabled logging to console and full logging and found this message:

ENGINE - [11:23:58.3492-Core-15] ERROR (Internal): System.NullReferenceException: Object reference not set to an instance of an object.
at nCrunch.Client.Model.ClientModelAlignmentAction.AlignModelComponentWithSnapshotComponent(ModelComponent modelComponent, SnapshotComponent snapshotComponent, CoverageDatabase coverageDatabase)
at nCrunch.Client.Model.ClientModelSynchroniser.(AllProjectsSynchronisedEvent )


How can I diagnose and solve this problem?

Edited

Hi,

Thanks for sharing this issue.

This is caused by cache file corruption. You can restore the state of the engine by deleting the _NCrunch_SOLUTIONNAME directory adjacent to your solution file (with the engine disabled).

Do you remember anything you may have done that could have triggered this? A few people have been hit by this problem and I'd like to try and reproduce and properly fix it.
Thanx. Removing the folder did work.

Unfortunately I cannot remember what I did.
Before removing the cache folder I zipped it. If you want I can sent it to you, so you can examine what is corrupt. Maybe this can help you.
Furthermore this is a BizTalk solution, thus during build there are a lot of special builds like Maps (*.btm), Orchestrations (*.odx) and such.
Beaker wrote:
Unfortunately I cannot remember what I did.
Before removing the cache folder I zipped it. If you want I can sent it to you, so you can examine what is corrupt. Maybe this can help you.
Furthermore this is a BizTalk solution, thus during build there are a lot of special builds like Maps (*.btm), Orchestrations (*.odx) and such.


I won't turn down an opportunity to look at a corrupt cache file - the details in this could very well yield a clue as to what happened. At the very least, I may be able to make the system more resilient to this form of corruption so that it can recover sensibly.

However, the cache file DOES contain elements of source code from your solution. I'm not sure if this would cause problems with the IP for your project. If this is a commercial project, I'd suggest checking with the IP holder first to see if they are OK with me obtaining it for diagnostic purposes only.
v2.24 has just been released with a fallback to improve handling of the above cache corruption issue. Unfortunately, I still haven't been able to reproduce the issue itself, but at least NCrunch should now be able to recover itself and work normally (with some temporary loss of cached state) if it encounters the problem.

Post a reply

Log in to reply.