Bug 27 - Parser errors in C# binding
Summary: Parser errors in C# binding
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: --- major
Target Milestone: 2.8
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-07-20 18:10 UTC by Mikayla Hutchinson [MSFT]
Modified: 2011-09-15 03:02 UTC (History)
2 users (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 Mikayla Hutchinson [MSFT] 2011-07-20 18:10:18 UTC
ERROR [2011-07-20 23:08:59Z]: Error reading attributes
System.InvalidOperationException: Failed to resolve type: System.Diagnostics.PerformanceCounterCategoryType
  at Mono.Cecil.Mixin.CheckedResolve (Mono.Cecil.TypeReference self) [0x00025] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/TypeReference.cs:325 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum (Mono.Cecil.TypeReference enum_type) [0x00000] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2920 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue (Mono.Cecil.TypeReference type) [0x00040] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2823 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeElement (Mono.Cecil.TypeReference type) [0x00032] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2809 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeElement (Mono.Cecil.TypeReference type) [0x00025] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2807 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument (Mono.Cecil.TypeReference type) [0x00018] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2744 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments (Mono.Cecil.CustomAttribute attribute, Mono.Collections.Generic.Collection`1 parameters) [0x00021] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2735 
  at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature (Mono.Cecil.CustomAttribute attribute) [0x00031] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2265 
  at Mono.Cecil.CustomAttribute.<Resolve>m__32 (Mono.Cecil.CustomAttribute attribute, Mono.Cecil.MetadataReader reader) [0x00000] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/CustomAttribute.cs:199 
  at Mono.Cecil.ModuleDefinition.Read[CustomAttribute,CustomAttribute] (Mono.Cecil.CustomAttribute item, System.Func`3 read) [0x00018] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/ModuleDefinition.cs:766 
  at Mono.Cecil.CustomAttribute.Resolve () [0x00017] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/CustomAttribute.cs:198 
  at Mono.Cecil.CustomAttribute.get_Fields () [0x00000] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/CustomAttribute.cs:132 
  at MonoDevelop.Projects.Dom.DomCecilAttribute..ctor (Mono.Cecil.CustomAttribute customAttribute) [0x000f1] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Dom/DomCecilAttribute.cs:68 
ERROR [2011-07-20 23:08:59Z]: [SharedHostProcess] Error reading attributes
System.InvalidOperationException: Failed to resolve type: System.Diagnostics.PerformanceCounterCategoryType
  at Mono.Cecil.Mixin.CheckedResolve (Mono.Cecil.TypeReference self) [0x00025] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/TypeReference.cs:325 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum (Mono.Cecil.TypeReference enum_type) [0x00000] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2920 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue (Mono.Cecil.TypeReference type) [0x00040] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2823 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeElement (Mono.Cecil.TypeReference type) [0x00032] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2809 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeElement (Mono.Cecil.TypeReference type) [0x00025] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2807 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument (Mono.Cecil.TypeReference type) [0x00018] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2744 
  at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments (Mono.Cecil.CustomAttribute attribute, Mono.Collections.Generic.Collection`1 parameters) [0x00021] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2735 
  at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature (Mono.Cecil.CustomAttribute attribute) [0x00031] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/AssemblyReader.cs:2265 
  at Mono.Cecil.CustomAttribute.<Resolve>m__32 (Mono.Cecil.CustomAttribute attribute, Mono.Cecil.MetadataReader reader) [0x00000] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/CustomAttribute.cs:199 
  at Mono.Cecil.ModuleDefinition.Read[CustomAttribute,CustomAttribute] (Mono.Cecil.CustomAttribute item, System.Func`3 read) [0x00018] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/ModuleDefinition.cs:766 
  at Mono.Cecil.CustomAttribute.Resolve () [0x00017] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/CustomAttribute.cs:198 
  at Mono.Cecil.CustomAttribute.get_Fields () [0x00000] in /Users/michael/Mono/monodevelop/main/contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/CustomAttribute.cs:132 
  at MonoDevelop.Projects.Dom.DomCecilAttribute..ctor (Mono.Cecil.CustomAttribute customAttribute) [0x000f1] in /Users/michael/Mono/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Dom/DomCecilAttribute.cs:68 
The application was terminated by a signal: SIGKILL
Visit unknown expression:Mono.CSharp.EmptyExpression
   at System.Environment.get_StackTrace()
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit(Mono.CSharp.Expression expression)
   at Mono.CSharp.Expression.Accept(Mono.CSharp.StructuralVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit(Mono.CSharp.Binary binaryExpression)
   at Mono.CSharp.Binary.Accept(Mono.CSharp.StructuralVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor+<GetAttributes>c__Iterator5.MoveNext()
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.ConvertAttributeSection(System.Collections.Generic.List`1 optAttributes)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.AddAttributeSection(ICSharpCode.NRefactory.CSharp.AstNode parent, Mono.CSharp.Attributable a)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit(Mono.CSharp.Class c)
   at Mono.CSharp.Class.Accept(Mono.CSharp.StructuralVisitor visitor)
   at Mono.CSharp.StructuralVisitor.VisitNamespaceBody(Mono.CSharp.Namespace nspace)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit(Mono.CSharp.Namespace nspace)
   at Mono.CSharp.UsingsBag+Namespace.Accept(Mono.CSharp.StructuralVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse(Mono.CSharp.CompilerCompilationUnit top, Int32 line)
   at MonoDevelop.CSharp.Parser.McsParser.Parse(MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName, System.String content)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.DoParseFile(MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName, System.String fileContent)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.UpdateFile(MonoDevelop.Projects.Project[] projects, System.String fileName, System.Func`1 getContent)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.Parse(MonoDevelop.Projects.Project project, System.String fileName, System.Func`1 getContent)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.Parse(MonoDevelop.Projects.Project project, System.String fileName)
   at MonoDevelop.Projects.Dom.Serialization.ProjectCodeCompletionDatabase.ParseFile(System.String fileName, IProgressMonitor monitor)
   at MonoDevelop.Projects.Dom.Serialization.SerializationCodeCompletionDatabase.ParseCallback(System.Object ob, IProgressMonitor monitor)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.ConsumeParsingQueue()
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.ParserUpdateThread()
   at System.Threading.Thread.StartUnsafe()
Visit unknown expression:Mono.CSharp.EmptyExpression
   at System.Environment.get_StackTrace()
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit(Mono.CSharp.Expression expression)
   at Mono.CSharp.Expression.Accept(Mono.CSharp.StructuralVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit(Mono.CSharp.Binary binaryExpression)
   at Mono.CSharp.Binary.Accept(Mono.CSharp.StructuralVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor+<GetAttributes>c__Iterator5.MoveNext()
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.ConvertAttributeSection(System.Collections.Generic.List`1 optAttributes)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.AddAttributeSection(ICSharpCode.NRefactory.CSharp.AstNode parent, Mono.CSharp.Attributable a)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit(Mono.CSharp.Class c)
   at Mono.CSharp.Class.Accept(Mono.CSharp.StructuralVisitor visitor)
   at Mono.CSharp.StructuralVisitor.VisitNamespaceBody(Mono.CSharp.Namespace nspace)
   at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit(Mono.CSharp.Namespace nspace)
   at Mono.CSharp.UsingsBag+Namespace.Accept(Mono.CSharp.StructuralVisitor visitor)
   at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse(Mono.CSharp.CompilerCompilationUnit top, Int32 line)
   at MonoDevelop.CSharp.Parser.McsParser.Parse(MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName, System.String content)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.DoParseFile(MonoDevelop.Projects.Dom.Parser.ProjectDom dom, System.String fileName, System.String fileContent)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.UpdateFile(MonoDevelop.Projects.Project[] projects, System.String fileName, System.Func`1 getContent)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.Parse(MonoDevelop.Projects.Project project, System.String fileName, System.Func`1 getContent)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.Parse(MonoDevelop.Projects.Project project, System.String fileName)
   at MonoDevelop.Projects.Dom.Serialization.ProjectCodeCompletionDatabase.ParseFile(System.String fileName, IProgressMonitor monitor)
   at MonoDevelop.Projects.Dom.Serialization.SerializationCodeCompletionDatabase.ParseCallback(System.Object ob, IProgressMonitor monitor)
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.ConsumeParsingQueue()
   at MonoDevelop.Projects.Dom.Parser.ProjectDomService.ParserUpdateThread()
   at System.Threading.Thread.StartUnsafe()
Comment 1 Mike Krüger 2011-07-22 02:18:05 UTC
fixed the empty expression thing. I don't know why you get the others - I would need a repro case there.
Comment 2 Mike Krüger 2011-07-22 02:19:40 UTC
closing
Comment 3 Mikayla Hutchinson [MSFT] 2011-07-22 04:20:46 UTC
Repro for the cecil resolve error is simple, delete all the pidbs and open the MD solution.
Comment 4 Mike Krüger 2011-08-31 01:44:19 UTC
Why was this reopened ? I thought I fixed the resolve error as well.
Comment 5 Mike Krüger 2011-09-15 03:02:48 UTC
closing - works for me.