VS2013 crashes due to NullReferenceException in Analysis.NodejsModuleBuilder.EventEmitterEmit

Aug 11, 2014 at 11:01 PM
I created project from existing code. It builds and runs fine, but crashes VS (Visual Studio stopped working...) every couple of minutes even I am not doing much.

I wonder if there's a way to troubleshoot this problem, like looking into some logs so perhaps I can post some details about the crash?

I am running 1.0 Beta 2.

-Stan
Coordinator
Aug 11, 2014 at 11:57 PM
You should take a look at the Windows event log (in Control Panel). Under Windows Logs -> Application there, you should see Error events for these crashes. The ones with Source=".NET Runtime" contain call stack at the time of the crash. Can you share these here?
Aug 12, 2014 at 12:10 AM
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at Microsoft.NodejsTools.Analysis.NodejsModuleBuilder.EventEmitterEmit(Microsoft.NodejsTools.Analysis.Values.FunctionValue, Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet[])
at Microsoft.NodejsTools.Analysis.Values.SpecializedFunctionValue.Call(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet[])
at Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateCall(Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator, Microsoft.NodejsTools.Parsing.Node)
at Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateWorker(Microsoft.NodejsTools.Parsing.Node)
at Microsoft.NodejsTools.Analysis.Analyzer.DDG.Walk(Microsoft.NodejsTools.Parsing.ExpressionStatement)
at Microsoft.NodejsTools.Parsing.ExpressionStatement.Walk(Microsoft.NodejsTools.Parsing.AstVisitor)
at Microsoft.NodejsTools.Analysis.Analyzer.DDG.Walk(Microsoft.NodejsTools.Parsing.Block)
at Microsoft.NodejsTools.Parsing.Block.Walk(Microsoft.NodejsTools.Parsing.AstVisitor)
at Microsoft.NodejsTools.Analysis.Analyzer.DDG.Walk(Microsoft.NodejsTools.Parsing.IfNode)
at Microsoft.NodejsTools.Parsing.IfNode.Walk(Microsoft.NodejsTools.Parsing.AstVisitor)
at Microsoft.NodejsTools.Analysis.Analyzer.DDG.Walk(Microsoft.NodejsTools.Parsing.Block)
at Microsoft.NodejsTools.Parsing.Block.Walk(Microsoft.NodejsTools.Parsing.AstVisitor)
at Microsoft.NodejsTools.Analysis.Analyzer.FunctionAnalysisUnit.AnalyzeWorker(Microsoft.NodejsTools.Analysis.Analyzer.DDG, System.Threading.CancellationToken)
at Microsoft.NodejsTools.Analysis.Analyzer.DDG.Analyze(Microsoft.NodejsTools.Analysis.Deque`1<Microsoft.NodejsTools.Analysis.AnalysisUnit>, System.Threading.CancellationToken)
at Microsoft.NodejsTools.Analysis.JsAnalyzer.AnalyzeQueuedEntries(System.Threading.CancellationToken)
at Microsoft.NodejsTools.Intellisense.AnalysisQueue+GroupAnalysis.Analyze(System.Threading.CancellationToken)
at Microsoft.NodejsTools.Intellisense.AnalysisQueue.Worker(System.Object)
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart(System.Object)
Coordinator
Aug 12, 2014 at 12:24 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Marked as answer by RickWinter on 8/11/2014 at 4:24 PM
Aug 12, 2014 at 1:36 PM
Hi,

I have the same problem, but not the same error.
VS2013 also crash on my computer (only with nodejs projects) but the error in my case is :

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Collections.Generic.KeyNotFoundException
Stack:
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__5(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()


Emilien
Coordinator
Aug 12, 2014 at 6:28 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.