Bug 14957 - System.InvalidOperationException: Sequence contains no elements
Summary: System.InvalidOperationException: Sequence contains no elements
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-09-24 13:24 UTC by Marek Safar
Modified: 2013-09-24 23:22 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 2013-09-24 13:24:31 UTC
System.InvalidOperationException: Sequence contains no elements
  at System.Linq.Enumerable.First[Statement] (IEnumerable`1 source) [0x0005b] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/System.Core/System.Linq/Enumerable.cs:836 
  at ICSharpCode.NRefactory.CSharp.FormattingVisitor.FormatAccessor (ICSharpCode.NRefactory.CSharp.Accessor accessor, BraceStyle braceStyle, PropertyFormatting blockFormatting, Boolean oneLine) [0x0019b] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_TypeMembers.cs:149 
  at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitPropertyDeclaration (ICSharpCode.NRefactory.CSharp.PropertyDeclaration propertyDeclaration) [0x00382] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_TypeMembers.cs:100 
  at ICSharpCode.NRefactory.CSharp.PropertyDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/TypeMembers/PropertyDeclaration.cs:70 
  at ICSharpCode.NRefactory.CSharp.FormattingVisitor+<VisitTypeDeclaration>c__AnonStorey82.<>m__1C9 (ICSharpCode.NRefactory.CSharp.AstNode child) [0x000fd] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Global.cs:242 
  at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitChildrenToFormat (ICSharpCode.NRefactory.CSharp.AstNode parent, System.Action`1 callback) [0x00090] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor.cs:101 
  at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00183] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Global.cs:218 
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/GeneralScope/TypeDeclaration.cs:123 
  at ICSharpCode.NRefactory.CSharp.FormattingVisitor+<VisitSyntaxTree>c__AnonStorey80.<>m__1C6 (ICSharpCode.NRefactory.CSharp.AstNode child) [0x00065] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Global.cs:70 
  at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitChildrenToFormat (ICSharpCode.NRefactory.CSharp.AstNode parent, System.Action`1 callback) [0x000db] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor.cs:105 
  at ICSharpCode.NRefactory.CSharp.FormattingVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree unit) [0x00023] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor_Global.cs:63 
  at ICSharpCode.NRefactory.CSharp.SyntaxTree.AcceptVisitor (IAstVisitor visitor) [0x00003] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Ast/SyntaxTree.cs:140 
  at ICSharpCode.NRefactory.CSharp.CSharpFormatter.AnalyzeFormatting (IDocument document, ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree, CancellationToken token) [0x00036] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory.CSharp/Formatter/CSharpFormatter.cs:140 
  at MonoDevelop.CSharp.Formatting.OnTheFlyFormatter.GetFormattingChanges (MonoDevelop.Projects.Policies.PolicyContainer policyParent, IEnumerable`1 mimeTypeChain, MonoDevelop.Ide.Gui.Document document, System.String input, DomRegion formattingRegion, System.Int32& formatStartOffset, System.Int32& formatLength, Boolean formatLastStatementOnly) [0x000eb] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/OnTheFlyFormatter.cs:166 
  at MonoDevelop.CSharp.Formatting.OnTheFlyFormatter.Format (MonoDevelop.Projects.Policies.PolicyContainer policyParent, IEnumerable`1 mimeTypeChain, MonoDevelop.Ide.Gui.Document data, Int32 startOffset, Int32 endOffset, Boolean exact, Boolean formatLastStatementOnly) [0x0021c] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/OnTheFlyFormatter.cs:237 
  at MonoDevelop.CSharp.Formatting.OnTheFlyFormatter.FormatStatmentAt (MonoDevelop.Ide.Gui.Document data, DocumentLocation location) [0x00041] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/OnTheFlyFormatter.cs:73 
  at MonoDevelop.CSharp.Formatting.CSharpTextEditorIndentation.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00732] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpTextEditorIndentation.cs:522 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Debugger.ExceptionCaughtTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x0006a] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs:441 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Key key, UInt32 ch, ModifierType state) [0x00013] in /Users/builder/data/lanes/monodevelop-lion-master/3e9e44d7/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:241
Comment 1 Marek Safar 2013-09-24 13:24:40 UTC
using System;

class X
{
	public int Foo { get {}
}

class Program
{
	public static void Main(string[] args)
	{
		using (var x = new X


	}
}