controlflow / resharper-heapview

ReSharper Heap Allocations Viewer plugin
MIT License
303 stars 28 forks source link

"Analyzer 'ReSharperPlugin.HeapView.Analyzers.AllocationOfClosuresAnalyzer' threw the following exception: myThisReferenceCaptureScopeNode" #115

Closed ForNeVeR closed 1 year ago

ForNeVeR commented 1 year ago

In ReSharper/Rider starting from 231 EAP4, we receive a fair amount of this exception:

--- EXCEPTION #1/2 [AssertionException]
Message = myThisReferenceCaptureScopeNode
ExceptionPath = Root.InnerException
ClassName = JetBrains.Diagnostics.Assertion+AssertionException
HResult = COR_E_EXCEPTION=80131500
Source = JetBrains.Lifetimes
StackTraceString = “
  at JetBrains.Diagnostics.Assertion.Fail(String message) in Fail.il:line IL_0006 mvid 117E
     at JetBrains.Diagnostics.Assertion.AssertNotNull(Object condition, String message) in AssertNotNull.il:line IL_0008 mvid 117E
     at ReSharperPlugin.HeapView.Analyzers.DisplayClassStructure.ProcessThisReferenceCaptureInsideClosure(ICSharpExpression thisReferenceExpression) in /mnt/agent/work/a1bd0292f01549c5/src/dotnet/ReSharperPlugin.HeapView/Analyzers/DisplayClassStructure.cs:line 660
     at ReSharperPlugin.HeapView.Analyzers.DisplayClassStructure.ProcessReferenceExpressionInsideClosure(IReferenceExpression referenceExpression, ResolveResultWithInfo resolveResult) in /mnt/agent/work/a1bd0292f01549c5/src/dotnet/ReSharperPlugin.HeapView/Analyzers/DisplayClassStructure.cs:line 497
     at ReSharperPlugin.HeapView.Analyzers.DisplayClassStructure.ProcessReferenceExpression(IReferenceExpression referenceExpression) in /mnt/agent/work/a1bd0292f01549c5/src/dotnet/ReSharperPlugin.HeapView/Analyzers/DisplayClassStructure.cs:line 423
     at ReSharperPlugin.HeapView.Analyzers.DisplayClassStructure.JetBrains.ReSharper.Psi.IRecursiveElementProcessor.ProcessBeforeInterior(ITreeNode element) in /mnt/agent/work/a1bd0292f01549c5/src/dotnet/ReSharperPlugin.HeapView/Analyzers/DisplayClassStructure.cs:line 392
     at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendants(ITreeNode root, IRecursiveElementProcessor processor) in ProcessDescendants.il:line IL_0080 mvid F235
     at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessThisAndDescendants(ITreeNode root, IRecursiveElementProcessor processor) in ProcessThisAndDescendants.il:line IL_000E mvid F235
     at ReSharperPlugin.HeapView.Analyzers.DisplayClassStructure.Build(ITreeNode declaration) in /mnt/agent/work/a1bd0292f01549c5/src/dotnet/ReSharperPlugin.HeapView/Analyzers/DisplayClassStructure.cs:line 79
     at ReSharperPlugin.HeapView.Analyzers.AllocationOfClosuresAnalyzer.Run(ITreeNode treeNode, ElementProblemAnalyzerData data, IHighlightingConsumer consumer) in /mnt/agent/work/a1bd0292f01549c5/src/dotnet/ReSharperPlugin.HeapView/Analyzers/AllocationOfClosuresAnalyzer.cs:line 45
     at ReSharperPlugin.HeapView.Analyzers.HeapAllocationAnalyzerBase`1.JetBrains.ReSharper.Feature.Services.Daemon.IElementProblemAnalyzer.Run(ITreeNode element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer) in /mnt/agent/work/a1bd0292f01549c5/src/dotnet/ReSharperPlugin.HeapView/Analyzers/HeapAllocationAnalyzerBase.cs:line 14
     at JetBrains.ReSharper.Feature.Services.Daemon.ElementProblemAnalyzerRegistrar.ElementAnalyzerDispatcher.Run(ITreeNode element, IHighlightingConsumer consumer) in Run.il:line IL_0063 mvid 6DF6
”

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Analyzer 'ReSharperPlugin.HeapView.Analyzers.AllocationOfClosuresAnalyzer' threw the following exception: myThisReferenceCaptureScopeNode”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Util.Logging.Logger.LogException(String comment, Exception ex) in LogException.il:line IL_0000 mvid 6042
     at JetBrains.ReSharper.Feature.Services.Daemon.ElementProblemAnalyzerRegistrar.ElementAnalyzerDispatcher.Run(ITreeNode element, IHighlightingConsumer consumer) in Run.il:line IL_0019 mvid 6DF6
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpErrorStageProcess.ProcessAfterInterior(ITreeNode element, IHighlightingConsumer consumer) in ProcessAfterInterior.il:line IL_0000 mvid 6DFE
     at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessDescendants(ITreeNode root, IRecursiveElementProcessor processor) in ProcessDescendants.il:line IL_0069 mvid F235
     at JetBrains.ReSharper.Psi.RecursiveElementProcessorExtensions.ProcessThisAndDescendants(ITreeNode root, IRecursiveElementProcessor processor) in ProcessThisAndDescendants.il:line IL_003E mvid F235
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.<>c__DisplayClass4_0.<Execute>g__MemberHighlighter|0(ICSharpTypeMemberDeclaration declaration) in CSharpIncrementalDaemonStageProcessBase.il:line IL_002C mvid 6DFE or CSharpIncrementalDaemonStageProcessBase.il:line IL_005A mvid 6DFE
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.<>c__DisplayClass4_3.<Execute>b__4() in CSharpIncrementalDaemonStageProcessBase.il:line IL_002C mvid 6DFE or CSharpIncrementalDaemonStageProcessBase.il:line IL_005A mvid 6DFE
     at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action) in AccessViolationCatcher.il:line IL_0000 mvid 6042
     at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass38_0`1.<Create>b__0(Object state) in TaskHost.il:line IL_00AB mvid 6042
     at System.Threading.Tasks.Task`1.InnerInvoke() in InnerInvoke.il:line IL_002B mvid 06E6
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in RunInternal.il:line IL_0040 mvid 06E6
     at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in ExecuteWithThreadLocal.il:line IL_0096 mvid 06E6
     at System.Threading.Tasks.Task.ExecuteEntry() in ExecuteEntry.il:line IL_0036 mvid 06E6
     at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task) in ExecuteTask.il:line IL_0014 mvid 6042
     at JetBrains.Application.Threading.Tasks.TaskBarrier.WaitAll() in WaitAll.il:line IL_0086 mvid 6042
     at JetBrains.Util.SafeDisposable.DisposeInternal() in DisposeInternal.il:line IL_0013 mvid 6042
     at JetBrains.ReSharper.Daemon.CSharp.Stages.CSharpIncrementalDaemonStageProcessBase.Execute(Action`1 committer) in Execute.il:line IL_01BD mvid 6DFE
     at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.RunStage(IDaemonStage stage, DaemonProcessKind processKind, Action`2 commiter, IContextBoundSettingsStore settingsStore, HashSet`1 disabledStages, PsiIsolationScope psiIsolationScope) in RunStage.il:line IL_0168 mvid 6DF6
     at JetBrains.ReSharper.Feature.Services.Daemon.DaemonProcessBase.<>c__DisplayClass47_1.<DoHighlighting>g__StageProc|1(IDaemonStage stage) in DaemonProcessBase.il:line IL_0013 mvid 6DF6
     at JetBrains.Application.Threading.Tasks.TaskBarrierExtensions.<>c__DisplayClass0_1.<EnqueueDependentJobs>b__2() in TaskBarrierExtensions.il:line IL_0000 mvid 6042
     at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action) in AccessViolationCatcher.il:line IL_0000 mvid 6042
     at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass38_0`1.<Create>b__0(Object state) in TaskHost.il:line IL_00AB mvid 6042
     at System.Threading.Tasks.Task`1.InnerInvoke() in InnerInvoke.il:line IL_002B mvid 06E6
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in RunInternal.il:line IL_0040 mvid 06E6
     at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) in ExecuteWithThreadLocal.il:line IL_0096 mvid 06E6
     at System.Threading.Tasks.Task.ExecuteEntry() in ExecuteEntry.il:line IL_0036 mvid 06E6
     at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task) in ExecuteTask.il:line IL_0014 mvid 6042
     at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask() in EnqueueNextTask.il:line IL_0009 mvid 6042
     at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc() in ThreadPoolProc.il:line IL_0197 mvid 6042
     at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.StartProc() in StartProc.il:line IL_0000 mvid 6042
”

No idea, yet, what's causing this.