Bug 4696 - MD crashes with System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary
Summary: MD crashes with System.Collections.Generic.KeyNotFoundException: The given ke...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Linux
: High normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-04-27 12:36 UTC by Marek Safar
Modified: 2012-04-28 07:34 UTC (History)
1 user (show)

Tags:
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 Marek Safar 2012-04-27 12:36:00 UTC
An unhandled exception has occured. Terminating MonoDevelop? True
System.AggregateException:  ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (System.Collections.Generic.TKey key) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.GetResolveResult (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00066] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:440 
  at ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver.Resolve (ICSharpCode.NRefactory.CSharp.AstNode node, CancellationToken cancellationToken) [0x0004d] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Resolver/CSharpAstResolver.cs:151 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitIdentifierExpression (ICSharpCode.NRefactory.CSharp.IdentifierExpression identifierExpression) [0x00008] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:196 
  at ICSharpCode.NRefactory.CSharp.IdentifierExpression.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs:65 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitMemberReferenceExpression (ICSharpCode.NRefactory.CSharp.MemberReferenceExpression memberReferenceExpression) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:454 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitMemberReferenceExpression (ICSharpCode.NRefactory.CSharp.MemberReferenceExpression memberReferenceExpression) [0x00000] in <filename unknown>:0 
  at ICSharpCode.NRefactory.CSharp.MemberReferenceExpression.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/Expressions/MemberReferenceExpression.cs:100 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitInvocationExpression (ICSharpCode.NRefactory.CSharp.InvocationExpression invocationExpression) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:444 
  at ICSharpCode.NRefactory.CSharp.InvocationExpression.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/Expressions/InvocationExpression.cs:55 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitVariableInitializer (ICSharpCode.NRefactory.CSharp.VariableInitializer variableInitializer) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:229 
  at ICSharpCode.NRefactory.CSharp.VariableInitializer.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/VariableInitializer.cs:154 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitVariableDeclarationStatement (ICSharpCode.NRefactory.CSharp.VariableDeclarationStatement variableDeclarationStatement) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:374 
  at ICSharpCode.NRefactory.CSharp.VariableDeclarationStatement.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/Statements/VariableDeclarationStatement.cs:71 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:244 
  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs:129 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitUnsafeStatement (ICSharpCode.NRefactory.CSharp.UnsafeStatement unsafeStatement) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:364 
  at ICSharpCode.NRefactory.CSharp.UnsafeStatement.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/Statements/UnsafeStatement.cs:47 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:244 
  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs:129 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:209 
  at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/MethodDeclaration.cs:80 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:134 
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs:107 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:129 
  at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs:118 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:189 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitCompilationUnit (ICSharpCode.NRefactory.CSharp.CompilationUnit unit) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:49 
  at ICSharpCode.NRefactory.CSharp.CompilationUnit.AcceptVisitor (IAstVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Ast/CompilationUnit.cs:112 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+<HandleDocumentParsed>c__AnonStorey20.<>m__2F () [0x0006c] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:147 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /home/marek/git/mono/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:70 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /home/marek/git/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:481 
  at System.Threading.Tasks.Task.ThreadStart () [0x0007b] in /home/marek/git/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:393
Comment 1 Mike Krüger 2012-04-28 07:34:25 UTC
Already fixed - I assume unsafe statement is involved.