Bug 6802 - KeyNotFoundException in VariableReferenceGraphBuilder
Summary: KeyNotFoundException in VariableReferenceGraphBuilder
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-08-31 14:02 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-09-03 05:40 UTC (History)
1 user (show)

Tags: source-analysis
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Mikayla Hutchinson [MSFT] 2012-08-31 14:02:48 UTC
ERROR [2012-08-31 13:57:51Z]: CodeAnalysis: Got exception in inspector 'MonoDevelop.CSharp.Refactoring.CodeIssues.NRefactoryIssueProvider'
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[ICSharpCode.NRefactory.CSharp.Analysis.ControlFlowNode,ICSharpCode.NRefactory.CSharp.Refactoring.VariableReferenceNode].get_Item (ICSharpCode.NRefactory.CSharp.Analysis.ControlFlowNode key) [0x000a8] in /Users/michael/Mono/bockbuild/profiles/monodevelop-mac-dev/build-root/mono-2.10.9/_build/mono-2.10.9/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:150 
  at ICSharpCode.NRefactory.CSharp.Refactoring.VariableReferenceGraphBuilder+CfgVariableReferenceNodeBuilder.AddNode (ICSharpCode.NRefactory.CSharp.Analysis.ControlFlowNode startNode) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.Refactoring.VariableReferenceGraphBuilder+CfgVariableReferenceNodeBuilder.AddNode (ICSharpCode.NRefactory.CSharp.Analysis.ControlFlowNode startNode) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.Refactoring.VariableReferenceGraphBuilder+CfgVariableReferenceNodeBuilder.AddNode (ICSharpCode.NRefactory.CSharp.Analysis.ControlFlowNode startNode) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.Refactoring.VariableReferenceGraphBuilder+CfgVariableReferenceNodeBuilder.Build (ICSharpCode.NRefactory.CSharp.Analysis.ControlFlowNode startNode, ISet`1 references, ISet`1 refStatements, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.Refactoring.VariableReferenceGraphBuilder.Build (ICSharpCode.NRefactory.CSharp.Statement statement, ISet`1 references, ISet`1 refStatements, ICSharpCode.NRefactory.CSharp.Refactoring.BaseRefactoringContext context) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantAssignmentIssue+GatherVisitor.CollectIssues (ICSharpCode.NRefactory.CSharp.AstNode variableDecl, ICSharpCode.NRefactory.CSharp.BlockStatement rootStatement, ICSharpCode.NRefactory.Semantics.LocalResolveResult resolveResult) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantAssignmentIssue+GatherVisitor.VisitVariableInitializer (ICSharpCode.NRefactory.CSharp.VariableInitializer variableInitializer) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.VariableInitializer.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitVariableDeclarationStatement (ICSharpCode.NRefactory.CSharp.VariableDeclarationStatement variableDeclarationStatement) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.VariableDeclarationStatement.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (IAstVisitor visitor) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.GatherVisitorBase.GetIssues () [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.Refactoring.RedundantAssignmentIssue.GetIssues (ICSharpCode.NRefactory.CSharp.Refactoring.BaseRefactoringContext context) [0x00000] in <filename unknown>:0 
  at MonoDevelop.CSharp.Refactoring.CodeIssues.NRefactoryIssueProvider+<GetIssues>c__Iterator16.MoveNext () [0x00080] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeIssues/NRefactoryIssueProvider.cs:67 
  at MonoDevelop.CodeIssues.CodeAnalysisRunner+<Check>c__AnonStorey25.<>m__39 (MonoDevelop.CodeIssues.CodeIssueProvider provider) [0x0009f] in /Users/michael/Mono/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisRunner.cs:62
Comment 1 Mike Krüger 2012-09-03 05:40:34 UTC
Do you've a use case for this ?

I've looked at the implementation and maybe fixed that - but without use case it's hard to tell.

/closing for now