Bug 3361 - Exception while parsing :System.InvalidOperationException: The source sequence is empty
Summary: Exception while parsing :System.InvalidOperationException: The source sequenc...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-02-10 09:05 UTC by Marek Safar
Modified: 2012-02-10 09:41 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-02-10 09:05:16 UTC
Change this code 

[type:System.Obsolete ()]
enum Foo
{
}


to 

[
[type:System.Obsolete ()]
enum Foo
{
}

Exception while parsing :System.InvalidOperationException: The source sequence is empty
  at System.Linq.Enumerable.First[Attribute] (IEnumerable`1 source) [0x0005b] in /home/marek/git/mono/mcs/class/System.Core/System.Linq/Enumerable.cs:834 
  at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.ConvertAttributeSection (System.Collections.Generic.List`1 optAttributes) [0x0004a] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs:321 
  at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.AddAttributeSection (ICSharpCode.NRefactory.CSharp.AstNode parent, Mono.CSharp.Attributes attrs) [0x00026] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs:911 
  at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.AddAttributeSection (ICSharpCode.NRefactory.CSharp.AstNode parent, Mono.CSharp.Attributable a) [0x00017] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs:903 
  at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit (Mono.CSharp.Enum e) [0x00007] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs:664 
  at Mono.CSharp.Enum.Accept (Mono.CSharp.StructuralVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/enum.cs:206 
  at ICSharpCode.NRefactory.CSharp.CSharpParser+ConversionVisitor.Visit (Mono.CSharp.ModuleContainer mc) [0x00185] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs:105 
  at Mono.CSharp.ModuleContainer.Accept (Mono.CSharp.StructuralVisitor visitor) [0x00001] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/mcs/module.cs:282 
  at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (Mono.CSharp.CompilerCompilationUnit top, System.String fileName, Int32 lineModifier) [0x00020] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs:3583 
  at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (System.IO.Stream stream, System.String fileName, Int32 lineModifier) [0x000be] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs:3635 
  at ICSharpCode.NRefactory.CSharp.CSharpParser.Parse (System.IO.TextReader reader, System.String fileName, Int32 lineModifier) [0x0004e] in /home/marek/git/monodevelop/main/contrib/ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs:3564 
  at MonoDevelop.CSharp.Parser.TypeSystemParser.Parse (Boolean storeAst, System.String fileName, System.IO.TextReader content, MonoDevelop.Projects.Project project) [0x00081] in /home/marek/git/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/TypeSystemProvider.cs:62 
  at MonoDevelop.TypeSystem.TypeSystemService.ParseFile (MonoDevelop.Projects.Project project, System.String fileName, System.String mimeType, System.IO.TextReader content) [0x00035] in /home/marek/git/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.TypeSystem/TypeSystemService.cs:235
Comment 1 Mike Krüger 2012-02-10 09:41:12 UTC
fixed.