Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When fiddling around OOM exception happens #300

Closed
kant2002 opened this issue Jul 18, 2015 · 17 comments
Closed

When fiddling around OOM exception happens #300

kant2002 opened this issue Jul 18, 2015 · 17 comments

Comments

@kant2002
Copy link
Contributor

I was working in the my gulp file when this error happens. I work on the dev + debug build.

Memory usage ~1.8Gb.

Failed to save analysis System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Collections.Generic.Dictionary`2.Resize(Int32 newSize, Boolean forceNewHashCodes)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
   at Microsoft.NodejsTools.Analysis.AnalysisSerializer.ReverseMemoize(Object graph)
   at Microsoft.NodejsTools.Analysis.AnalysisSerializer.ClrSerializer.Serialize(Object value, AnalysisSerializer serializer, Stack`1 stack, BinaryWriter writer)
   at Microsoft.NodejsTools.Analysis.AnalysisSerializer.Serialize(Object graph, BinaryWriter writer)
   at Microsoft.NodejsTools.Analysis.AnalysisSerializer.Serialize(Stream serializationStream, Object graph)
   at Microsoft.NodejsTools.Intellisense.VsProjectAnalyzer.SaveAnalysis()

   at Microsoft.NodejsTools.Intellisense.VsProjectAnalyzer.SaveAnalysis()
   at Microsoft.NodejsTools.Intellisense.VsProjectAnalyzer.AnalysisQueue.Worker(Object threadStarted)
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)

I create dump file, and will try to find out what take so much memory. Probably related to #44 and #264

@kant2002
Copy link
Contributor Author

Here the some information for start

11d5a5b0   383139     10727892 Microsoft.NodejsTools.Parsing.Member
11d58074   414573     11608044 Microsoft.NodejsTools.Analysis.LocatedVariableDef
11f2a6c4      104     11685312 Microsoft.NodejsTools.Parsing.IndexSpan[]
11b355c0   300106     11804472 Newtonsoft.Json.Linq.JToken[]
10e87fd4   986811     11841732 Newtonsoft.Json.Linq.JProperty+JPropertyList
11b35684   249739     11987472 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[Newtonsoft.Json.Linq.JToken, Newtonsoft.Json]]
11d5a860   527138     12651312 Microsoft.NodejsTools.Parsing.JSVariableField
11d537a4  1069211     12830532 Microsoft.NodejsTools.Analysis.AnalysisProxy
11d5615c   943650     15098400 Microsoft.NodejsTools.Analysis.VariableDef
18ece61c   153972     17340168 System.Collections.Generic.HashSet`1+Slot[[Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis]][]
08bddc78   273248     18580864 Newtonsoft.Json.Linq.JObject
11d5a674   943031     18860620 Microsoft.NodejsTools.Parsing.Lookup
18ecf228   166158     18935976 System.Collections.Generic.HashSet`1+Slot[[Microsoft.NodejsTools.Parsing.EncodedSpan, Microsoft.NodejsTools.Analysis]][]
11d5419c   700533     19614924 Microsoft.NodejsTools.Analysis.Values.PropertyDescriptorValue
11d57f80  1294904     20718464 Microsoft.NodejsTools.Analysis.SingleDict`2+SingleDependency[[Microsoft.NodejsTools.Analysis.ProjectEntry, Microsoft.NodejsTools.Analysis],[Microsoft.NodejsTools.Analysis.Analyzer.ReferenceableDependencyInfo, Microsoft.NodejsTools.Analysis]]
11f21b68   331977     25533960 Microsoft.NodejsTools.Analysis.AnalysisDictionary`2+Bucket[[System.String, mscorlib],[Microsoft.NodejsTools.Analysis.Values.PropertyDescriptorValue, Microsoft.NodejsTools.Analysis]][]
11b35b94   249738     28599352 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[Newtonsoft.Json.Linq.JToken, Newtonsoft.Json]][]
11d57e28  2674892     32098704 Microsoft.NodejsTools.Analysis.SingleDict`2[[Microsoft.NodejsTools.Analysis.ProjectEntry, Microsoft.NodejsTools.Analysis],[Microsoft.NodejsTools.Analysis.Analyzer.ReferenceableDependencyInfo, Microsoft.NodejsTools.Analysis]]
08bdc5d0   893055     39294420 Newtonsoft.Json.Linq.JValue
11d56f78  1644946     46058488 Microsoft.NodejsTools.Analysis.Analyzer.ReferenceableDependencyInfo
08bdd240   986811     63155904 Newtonsoft.Json.Linq.JProperty
00b52d70   754156    167967816      Free
683e2784   742990    183515584 System.Int32[]
6838d938        2    191983320 System.Collections.Generic.Dictionary`2+Entry[[System.Object, mscorlib],[System.Int32, mscorlib]][]
683e0938  2512268    247663548 System.String

as you see there some strange data - 2 System.Collections.Generic.Dictionary2+Entry[[System.Object, mscorlib],[System.Int32, mscorlib]][]` objects which eats up 191Mb.

0:000> !dumpheap -type System.Collections.Generic.Dictionary`2+Entry[[System.Object, mscorlib],[System.Int32, mscorlib]][]
 Address       MT     Size
... skipped ...
1a44684c 6838d938      124     
...
d25c1010 6838d938 191983196

listing all that objects I found that only one of that object is take that space. other is 124 bytes in size.

Now output of offending object

0:000> !gcroot d25c1010
Found 0 unique roots (run '!GCRoot -all' to see all roots).

which probably indicates that 191MB was just allocating before I receive OOM. !gcroot -all run more then hour and I tired to wait.

I try to findout what is the other object of same type and it is

0:000> !gcroot 1a44684c
Thread 1900:
*** WARNING: Unable to verify checksum for Microsoft.VisualStudio.JSLS.ni.dll
*** ERROR: Module load completed but symbols could not be loaded for Microsoft.VisualStudio.JSLS.ni.dll
    02b5ed9c 508b7467 Microsoft.VisualStudio.JSLS.Shared.MiniTimer.WorkerThreadEntry()
        edi:  (interior)
            ->  044e4688 System.Object[]
            ->  0ccfd8c8 System.Collections.Generic.Dictionary`2[[System.Object, mscorlib],[System.Int32, mscorlib]]
            ->  1a44684c System.Collections.Generic.Dictionary`2+Entry[[System.Object, mscorlib],[System.Int32, mscorlib]][]

So far, I'm stuck. If somebody has other idea why OOM happens, please join

@kant2002
Copy link
Contributor Author

Now after VS release @mousetraps please take a look.

@billti
Copy link
Member

billti commented Aug 20, 2015

Does this occur even with the Analysis settings dialed back?

@billti billti added this to the Future milestone Aug 20, 2015
@kant2002
Copy link
Contributor Author

Not clear what you asking @billti .
I could take latest debug bits and try to open offending project where this was reproduced.

just for inormation - I have Quick intellisense set.
If you need other information let me know

@billti
Copy link
Member

billti commented Aug 24, 2015

Yes, the 'Quick intellisense' is what I was referring to. If this is still happening for you on latest bits (and especially if with 'retail' rather than 'debug'), then if you can attach a repro we can investigate I'll take a look. Thanks.

@kant2002
Copy link
Contributor Author

kant2002 commented Sep 4, 2015

On the 1.1.RC on the Release I don't have OOM exception, looks like it is only for Debug bits. I will try to doublecheck with 1.1 RC2 too. There possibility that OOM is due to debug implementation of data structures in .NET which double memory allocations, but I don't 100% sure about this. Anyway, this is still indicates that too much memory is used for the Analysis information.

I willing to debug this further, or if you have area which could indirectly helps, please route me to them. I willing to help and improve my development experience.

@kant2002
Copy link
Contributor Author

I on release 1.1RC2 and seems I seeing this issue. The memory usage is go up to ~2Gb, then go back 1Gb. Nothing in the ActivityLog.xml, but not sure if something should appear here. Should I try with Debug build to check if I have any issue?

VS2015, Quick Intellisense, NPM3

@kant2002
Copy link
Contributor Author

Maybe this is related. Often I see WER window popup which gather information about some error during working with VS. Don't know how to find what was cause.

@mousetraps
Copy link
Contributor

Are you on RC2 or RC2.1? What's the build number?

@kant2002
Copy link
Contributor Author

I am on RC2.1 now, but this behavoiur was on even on 1.1. Whant to point, VS does not crash, it just freezes and WER start collecting data in the background, then VS unfreezes and I could continue working.

So regarding that this is related to this issue is a bit speculative, based on fact that OOM is good candidate for WER and OOM also does not crash VS. I not 100% even sure that this is related to NTVS, but lately I work mostly with it, and no C# or other staff, so very likely that this is yours.

I still does not manage to create my debug build, so I could double check that issue is still in place.

@kant2002
Copy link
Contributor Author

kant2002 commented Oct 3, 2015

On latest build. The VS was crashed

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
Stack:
   at Microsoft.NodejsTools.Analysis.AnalysisSetDetails.AnalysisHashSet.Clone()
   at Microsoft.NodejsTools.Analysis.AnalysisSet.Create(System.Collections.Generic.IEnumerable`1<Microsoft.NodejsTools.Analysis.AnalysisProxy>)
   at Microsoft.NodejsTools.Analysis.Analyzer.DependentKeyValue.AddTypes(Microsoft.NodejsTools.Analysis.ProjectEntry, Microsoft.NodejsTools.Analysis.JsAnalyzer, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet, Boolean)
   at Microsoft.NodejsTools.Analysis.Values.ExpandoValue.SetIndex(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.AnalysisSetExtensions.SetIndex(Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator.AssignTo(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Parsing.Expression, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateBinary(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.ForNode)
   at Microsoft.NodejsTools.Parsing.ForNode.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.VsProjectAnalyzer+AnalysisQueue+GroupAnalysis.Analyze(System.Threading.CancellationToken)
   at Microsoft.NodejsTools.Intellisense.VsProjectAnalyzer+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)

@kant2002
Copy link
Contributor Author

kant2002 commented Oct 3, 2015

@mousetraps as I told you, i could find more crashes for you 😄

@kant2002
Copy link
Contributor Author

@mousetraps Any news? What kind of information I have to give to you for this to be resolved?

@kant2002
Copy link
Contributor Author

With latest bits

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
Stack:
   at Microsoft.NodejsTools.Analysis.AnalysisSetDetails.AnalysisHashSet.EnsureSize(Int32)
   at Microsoft.NodejsTools.Analysis.AnalysisSetDetails.AnalysisHashSet.CheckGrow()
   at Microsoft.NodejsTools.Analysis.AnalysisSetDetails.AnalysisHashSet.AddOne(Microsoft.NodejsTools.Analysis.AnalysisProxy)
   at Microsoft.NodejsTools.Analysis.AnalysisSetDetails.AnalysisHashSet.Union(System.Collections.Generic.IEnumerable`1<Microsoft.NodejsTools.Analysis.AnalysisProxy>, Boolean ByRef)
   at Microsoft.NodejsTools.Analysis.Analyzer.DependentKeyValue.AddTypes(Microsoft.NodejsTools.Analysis.ProjectEntry, Microsoft.NodejsTools.Analysis.JsAnalyzer, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet, Boolean)
   at Microsoft.NodejsTools.Analysis.Values.ExpandoValue.SetIndex(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.AnalysisSetExtensions.SetIndex(Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator.AssignTo(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Parsing.Expression, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateBinary(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.DDG.Walk(Microsoft.NodejsTools.Parsing.WhileNode)
   at Microsoft.NodejsTools.Parsing.WhileNode.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.VsProjectAnalyzer+AnalysisQueue+GroupAnalysis.Analyze(System.Threading.CancellationToken)
   at Microsoft.NodejsTools.Intellisense.VsProjectAnalyzer+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)

and

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
Stack:
   at System.Collections.Generic.HashSet`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetCapacity(Int32, Boolean)
   at System.Collections.Generic.HashSet`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].IncreaseCapacity()
   at System.Collections.Generic.HashSet`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].AddIfNotPresent(System.__Canon)
   at System.Collections.Generic.HashSet`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].UnionWith(System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at Microsoft.NodejsTools.Analysis.TypedDef`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CheckTypeCount(Microsoft.NodejsTools.Analysis.IAnalysisSet, Int32)
   at Microsoft.NodejsTools.Analysis.Values.ExpandoValue.SetMemberWorker(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, System.String, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Values.ObjectValue.SetMember(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, System.String, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Values.FunctionValue.SetMember(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, System.String, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Values.ExpandoValue.SetIndex(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.AnalysisSetExtensions.SetIndex(Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Analysis.AnalysisUnit, Microsoft.NodejsTools.Analysis.IAnalysisSet, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator.AssignTo(Microsoft.NodejsTools.Parsing.Node, Microsoft.NodejsTools.Parsing.Expression, Microsoft.NodejsTools.Analysis.IAnalysisSet)
   at Microsoft.NodejsTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateBinary(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.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.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.DDG.Walk(Microsoft.NodejsTools.Parsing.WhileNode)
   at Microsoft.NodejsTools.Parsing.WhileNode.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.VsProjectAnalyzer+AnalysisQueue+GroupAnalysis.Analyze(System.Threading.CancellationToken)
   at Microsoft.NodejsTools.Intellisense.VsProjectAnalyzer+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)

@kant2002
Copy link
Contributor Author

kant2002 commented Nov 1, 2015

Two more OOM crashes at

   at Microsoft.NodejsTools.Analysis.AnalysisSetDetails.AnalysisHashSet.EnsureSize(Int32)
.....

and one more at

   at System.Collections.Generic.HashSet`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].SetCapacity(Int32, Boolean)
....

Any other information which I should provided for you - @mousetraps or @billti ?

@DenisBiondic
Copy link

Crash happens for me with large amount of node modules, and it hangs trying to traverse the whole tree.

To fix - turn off analysis either completely (VS / Tools / Options / TextEditor / Node / Intellisense) or put this into your .nsproj file: node_modules;jspm_packages;dist

More info here:
https://github.com/Microsoft/nodejstools/wiki/Projects#ignoring-directories-for-analysis

@mousetraps
Copy link
Contributor

@DenisBiondic - could you please check out the ES6 Preview IntelliSense option and let us know if this helps address some of the perf issues you're running into?

@kant2002 We're currently working on integrating Salsa for our IntelliSense experience going forward (behind the ES6 Preview flag) which should help address some of these perf issues. Closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants