Bug 3967 - Exception when opening a linked file.
Summary: Exception when opening a linked file.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 2.8.8.1
Hardware: PC Mac OS
: Low normal
Target Milestone: ---
Assignee: Alan McGovern
URL:
: 3812 ()
Depends on:
Blocks:
 
Reported: 2012-03-19 10:40 UTC by Ruben Vermeersch
Modified: 2012-08-17 07:28 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 Ruben Vermeersch 2012-03-19 10:40:24 UTC
System.InvalidOperationException: Operation is not valid due to the current state of the object
  at System.Linq.Enumerable.Single[VersionInfo] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00038] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.Core/System.Linq/Enumerable.cs:2330 
  at System.Linq.Enumerable.Single[VersionInfo] (IEnumerable`1 source) [0x00006] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.Core/System.Linq/Enumerable.cs:2346 
  at MonoDevelop.VersionControl.Repository.GetVersionInfo (FilePath localPath, Boolean getRemoteStatus) [0x00000] in /Users/builder/data/lanes/monodevelop-mac-2.8.8.1/68894cb4/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs:154 
  at MonoDevelop.VersionControl.Repository.GetVersionInfo (FilePath localPath) [0x00000] in /Users/builder/data/lanes/monodevelop-mac-2.8.8.1/68894cb4/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs:148 
  at MonoDevelop.VersionControl.Views.SubviewAttachmentHandler.HandleDocumentChanged (System.Object sender, System.EventArgs e) [0x00045] in /Users/builder/data/lanes/monodevelop-mac-2.8.8.1/68894cb4/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/SubviewAttachmentHandler.cs:49 
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
  at MonoDevelop.Ide.Gui.Workbench.OnDocumentChanged (System.Object s, System.EventArgs a) [0x0000b] in /Users/builder/data/lanes/monodevelop-mac-2.8.8.1/68894cb4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:594 
  at MonoDevelop.Ide.Gui.DefaultWorkbench.OnActiveWindowChanged (System.Object sender, System.EventArgs e) [0x00075] in /Users/builder/data/lanes/monodevelop-mac-2.8.8.1/68894cb4/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs:749 
  at Gtk.Notebook.SwitchPageSignalCallback (IntPtr arg0, IntPtr arg1, UInt32 arg2, IntPtr gch) [0x00000] in <filename unknown>:0 



MonoDevelop 2.8.8.1
Installation UUID: 46adcb2c-0fef-4128-a852-9a6bc9a39109
Runtime:
	Mono 2.10.9 (tarball Wed Feb 29 17:12:24 EST 2012)
	GTK 2.24.10
	GTK# (2.12.0.0)
Apple Developer Tools:
	 Xcode 4.3.1 (1176)
	 Build 4E1019
Monotouch: 5.2.9 (Evaluation)
Mono for Android: 4.0.5.196261537 (Evaluation)
Build information:
	Release ID: 20808001
	Git revision: 68894cb4683cf4be662f84d8e786e75b47671d10
	Build date: 2012-02-28 22:59:41+0000
	Xamarin addins: 0aa7cf395748cfd1ff3d58df94b5cf38ed047c3e
Operating System:
	Mac OS X 10.7.3
	Darwin tsukuba.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
Comment 1 Alan McGovern 2012-03-20 07:19:33 UTC
Can you give me more information on about your project layout. I cannot reproduce this issue locally under the following circumstances:

1) Project which is not under version control containing a linked file which is not under version control
2) Project which is not under version control containing an linked file which is under version control
3) Project under version control containing a linked file not under version control
4) Project under version control (git) containing a linked file which is under a different version control system (svn)
5) Project under version control (git) containing a linked file in a different repository of the same version control system (git)
Comment 2 Ruben Vermeersch 2012-03-20 07:39:16 UTC
It's in a submodule.

Here's what I did:

1) File -> New Solution -> Make new C# Library (anything goes actually)
2) switch to to terminal, git init in solution folder
2) git submodule add git://github.com/praeclarum/sqlite-net.git Sqlite.Net
3) Back to Monodevelop
4) Right-click project, Add files -> Add the Sqlite.Net/src/SQLite.cs file (link it!)
5) Open SQLite.cs
6) Exception!
Comment 3 Alan McGovern 2012-03-20 10:39:26 UTC
Last week I committed a mitigation for this specific problem to prevent the exception from negatively affecting people. The next release of MonoDevelop should contain this workaround. Now that I have an actual repro for the problem I will see if I can fix it permanently. Thanks for the extra information, it's exactly what I needed!
Comment 4 Alan McGovern 2012-03-20 12:04:15 UTC
*** Bug 3812 has been marked as a duplicate of this bug. ***
Comment 5 Alan McGovern 2012-08-17 07:28:01 UTC
This has been fixed and should be in the next 3.0.4.x release.