Bug 12293 - Error while analyzing the file for the semantic highlighting
Summary: Error while analyzing the file for the semantic highlighting
Status: RESOLVED NORESPONSE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-05-17 15:36 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-06-28 02:46 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 NORESPONSE

Description Mikayla Hutchinson [MSFT] 2013-05-17 15:36:24 UTC
This happened when opening a solution, but it doesn't seem to be reproducible. Maybe the trace is useful.

ERROR [2013-05-17 14:15:33Z]: Error while analyzing the file for the semantic highlighting.
System.InvalidOperationException: Could not find a resolver state for any parent of the specified node. Are you trying to resolve a node that is not a descendant of the CSharpAstResolver's root node?
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.GetPreviouslyScannedContext (ICSharpCode.NRefactory.CSharp.AstNode node, ICSharpCode.NRefactory.CSharp.AstNode& parent) [0x00041] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:472 
  at ICSharpCode.NRefactory.CSharp.Resolver.ResolveVisitor.GetResolveResult (ICSharpCode.NRefactory.CSharp.AstNode node) [0x0004d] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/ResolveVisitor.cs:448 
  at ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver.Resolve (ICSharpCode.NRefactory.CSharp.AstNode node, CancellationToken cancellationToken) [0x0004d] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Resolver/CSharpAstResolver.cs:167 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitIdentifierExpression (ICSharpCode.NRefactory.CSharp.IdentifierExpression identifierExpression) [0x00008] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:292 
  at ICSharpCode.NRefactory.CSharp.IdentifierExpression.AcceptVisitor (IAstVisitor visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Expressions/IdentifierExpression.cs:74 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:286 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitReturnStatement (ICSharpCode.NRefactory.CSharp.ReturnStatement returnStatement) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:324 
  at ICSharpCode.NRefactory.CSharp.ReturnStatement.AcceptVisitor (IAstVisitor visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/ReturnStatement.cs:60 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:286 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitBlockStatement (ICSharpCode.NRefactory.CSharp.BlockStatement blockStatement) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:244 
  at ICSharpCode.NRefactory.CSharp.BlockStatement.AcceptVisitor (IAstVisitor visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/Statements/BlockStatement.cs:129 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:286 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitAccessor (ICSharpCode.NRefactory.CSharp.Accessor accessor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:224 
  at ICSharpCode.NRefactory.CSharp.Accessor.AcceptVisitor (IAstVisitor visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/Accessor.cs:97 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:286 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitPropertyDeclaration (ICSharpCode.NRefactory.CSharp.PropertyDeclaration propertyDeclaration) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:219 
  at ICSharpCode.NRefactory.CSharp.PropertyDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs:70 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:286 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:134 
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs:107 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:286 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitNamespaceDeclaration (ICSharpCode.NRefactory.CSharp.NamespaceDeclaration namespaceDeclaration) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:129 
  at ICSharpCode.NRefactory.CSharp.NamespaceDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/NamespaceDeclaration.cs:118 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00015] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:43 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+QuickTaskVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00019] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:286 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/DepthFirstAstVisitor.cs:49 
  at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (IAstVisitor visitor) [0x00001] in /Users/michael/Mono/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs:140 
  at MonoDevelop.CSharp.Highlighting.CSharpSyntaxMode+<HandleDocumentParsed>c__AnonStorey1A.<>m__0 () [0x00043] in /Users/michael/Mono/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Highlighting/CSharpSyntaxMode.cs:151
Comment 1 Mike Krüger 2013-05-24 03:48:53 UTC
Unlikely race condition - but I think I found it.
Comment 2 Mikayla Hutchinson [MSFT] 2013-05-28 14:25:32 UTC
Still happens on master.

May it have had something to do with the fact that the type system service was still parsing assembles?
Comment 3 Mikayla Hutchinson [MSFT] 2013-05-28 14:28:53 UTC
There was one class in the file (from another file in the same project) that was colored as not found. Reopening the file fixed this.
Comment 4 Mike Krüger 2013-05-29 01:47:24 UTC
Can you give me a new stack trace  - the old one doesn't match the line numbers.