Bug 12436 - Xamarin Studio deleted project when it failed to add to source control
Summary: Xamarin Studio deleted project when it failed to add to source control
Status: RESOLVED DUPLICATE of bug 6014
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 4.0.6
Hardware: PC Mac OS
: High critical
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2013-05-28 16:35 UTC by Neil Danson
Modified: 2013-07-16 05:29 UTC (History)
4 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 DUPLICATE of bug 6014

Description Neil Danson 2013-05-28 16:35:06 UTC
Tried adding a project to Source Control (bitbucket) which failed and crashed Xamarin Studio. The project was deleted during the crash.

Been trying to recover the files using Disk Drill but they seem to be VERY deleted. I'm guessing the files are lost forever. They didnt go to trash and after several hours of scanning no joy with Disk Drill.

The project was an F# IOS project. 

Stack Trace:


2013-05-27 07:50:01.583 XamarinStudio[6335:1007] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 
Starting Xamarin Studio
   Loading Workbench
      Initializing Main Window
WARNING [2013-05-27 07:50:03Z]: First run content index not found.
ERROR [2013-05-27 07:50:05Z]: Error while reading type system cache.
System.IO.EndOfStreamException: Failed to read past end of stream.
  at System.IO.BinaryReader.ReadByte () [0x00047] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.IO/BinaryReader.cs:318 
  at System.IO.BinaryReader.Read7BitEncodedInt () [0x0000b] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.IO/BinaryReader.cs:286 
  at ICSharpCode.NRefactory.Utils.BinaryReaderWith7BitEncodedInts.ReadInt32 () [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/Utils/7BitEncodedInts.cs:46 
  at ICSharpCode.NRefactory.Utils.FastSerializer.Deserialize (System.IO.BinaryReader reader) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/Utils/FastSerializer.cs:860 
  at MonoDevelop.Ide.TypeSystem.TypeSystemService.DeserializeObject[IProjectContent] (System.String path) [0x0002d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:602 
RES: True
ERROR [2013-05-27 07:50:58Z]: System.ArgumentException: Commit message must not be null or empty!
Parameter name: message
  at MonoDevelop.VersionControl.Git.GitRepository.OnCommit (MonoDevelop.VersionControl.ChangeSet changeSet, IProgressMonitor monitor) [0x000f4] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs:653 
  at MonoDevelop.VersionControl.Repository.Commit (MonoDevelop.VersionControl.ChangeSet changeSet, IProgressMonitor monitor) [0x0000c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs:416 
  at MonoDevelop.VersionControl.CommitCommand+CommitWorker.Run () [0x00028] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/CommitCommand.cs:102 
RES: True
WARNING [2013-05-27 07:53:03Z]: Could not save solution preferences: /Users/neildanson/Documents/FSharp iOS/Owls/Owls.userprefs
System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/neildanson/Documents/FSharp iOS/Owls/Owls.userprefs".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x001c6] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.IO/FileStream.cs:266 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.IO/FileStream.cs:132 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.Xml.XmlTextWriter..ctor (System.String filename, System.Text.Encoding encoding) [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/System.XML/System.Xml/XmlTextWriter2.cs:243 
  at MonoDevelop.Projects.WorkspaceItem.SaveUserProperties () [0x00036] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs:498 
ERROR [2013-05-27 07:53:06Z]: An unhandled exception has occured. Terminating MonoDevelop? False
System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/neildanson/Documents/FSharp iOS/Owls/Owls/.#AppDelegate.fs".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x001c6] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.IO/FileStream.cs:266 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.IO/FileStream.cs:132 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at Mono.TextEditor.Utils.TextFileUtility.WriteText (System.String fileName, System.String text, System.Text.Encoding encoding, Boolean hadBom) [0x0004f] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor.Utils/TextFileUtility.cs:206 
  at MonoDevelop.SourceEditor.SourceEditorView.Save (System.String fileName, System.Text.Encoding encoding) [0x00244] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:670 
  at MonoDevelop.SourceEditor.SourceEditorView.Save (System.String fileName) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:586 
  at MonoDevelop.Ide.Gui.Dialogs.DirtyFilesDialog.<SaveAndQuit>m__21 (TreeModel model, Gtk.TreePath path, TreeIter iter) [0x00032] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs:126 
  at GtkSharp.TreeModelForeachFuncWrapper.NativeCallback (IntPtr model, IntPtr path, IntPtr iter, IntPtr data) [0x00000] in <filename unknown>:0 
ERROR [2013-05-27 07:53:09Z]: An unhandled exception has occured. Terminating MonoDevelop? False
System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/neildanson/Documents/FSharp iOS/Owls/Owls/.#PissedOffOwl.fs".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x001c6] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.IO/FileStream.cs:266 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.IO/FileStream.cs:132 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at Mono.TextEditor.Utils.TextFileUtility.WriteText (System.String fileName, System.String text, System.Text.Encoding encoding, Boolean hadBom) [0x0004f] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor.Utils/TextFileUtility.cs:206 
  at MonoDevelop.SourceEditor.SourceEditorView.Save (System.String fileName, System.Text.Encoding encoding) [0x00244] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:670 
  at MonoDevelop.SourceEditor.SourceEditorView.Save (System.String fileName) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:586 
  at MonoDevelop.Ide.Gui.Dialogs.DirtyFilesDialog.<SaveAndQuit>m__21 (TreeModel model, Gtk.TreePath path, TreeIter iter) [0x00032] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/DirtyFilesDialog.cs:126 
  at GtkSharp.TreeModelForeachFuncWrapper.NativeCallback (IntPtr model, IntPtr path, IntPtr iter, IntPtr data) [0x00000] in <filename unknown>:0 
-----------------Serialize stack trace:
   at System.Environment.get_StackTrace() in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System/Environment.cs:line 261
   at MonoDevelop.Ide.TypeSystem.TypeSystemService.SerializeObject(System.String path, System.Object obj) in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:line 628
   at MonoDevelop.Ide.TypeSystem.TypeSystemService.StoreProjectCache(MonoDevelop.Projects.Project project, MonoDevelop.Ide.TypeSystem.ProjectContentWrapper wrapper) in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:line 709
   at MonoDevelop.Ide.TypeSystem.TypeSystemService.UnloadProject(MonoDevelop.Projects.Project project) in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:line 1448
   at MonoDevelop.Ide.TypeSystem.TypeSystemService.<Unload>m__221(MonoDevelop.Projects.Project project) in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:line 1428
   at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey51`1[[MonoDevelop.Projects.Project, MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null]].<>m__55(MonoDevelop.Projects.Project e, System.Threading.Tasks.ParallelLoopState s, System.Object l) in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:line 421
   at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey50`2[[MonoDevelop.Projects.Project, MonoDevelop.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=null],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<>m__53() in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:line 383
   at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke(System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:line 70
   at System.Threading.Tasks.Task.InnerInvoke() in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Task.cs:line 519
   at System.Threading.Tasks.Task.ThreadStart() in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Task.cs:line 418
   at System.Threading.Tasks.Task.Execute() in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/Task.cs:line 483
   at System.Threading.Tasks.TpScheduler.<QueueTask>m__7A(System.Object l) in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs:line 45
   at System.Threading.Thread.StartInternal() in /private/tmp/source/bockbuild-crypto-mono/profiles/mono-mac-xamarin/build-root/mono-3.0.10/mcs/class/corlib/System.Threading/Thread.cs:line 682
ERROR [2013-05-27 07:53:11Z]: Error while writing type system cache. (object:MonoDevelop.Ide.TypeSystem.MonoDevelopProjectContent)
System.Runtime.Serialization.SerializationException: Type MonoDevelop.Ide.TypeSystem.DefaultParsedDocument is not [Serializable].
  at ICSharpCode.NRefactory.Utils.FastSerializer.CreateScanner (System.Type type) [0x0034b] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/Utils/FastSerializer.cs:436 
  at ICSharpCode.NRefactory.Utils.FastSerializer.GetScanner (System.Type type) [0x00013] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/Utils/FastSerializer.cs:346 
  at ICSharpCode.NRefactory.Utils.FastSerializer+SerializationContext.Scan () [0x000ca] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/Utils/FastSerializer.cs:151 
  at ICSharpCode.NRefactory.Utils.FastSerializer.Serialize (System.IO.BinaryWriter writer, System.Object instance) [0x0001b] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/external/nrefactory/ICSharpCode.NRefactory/Utils/FastSerializer.cs:775 
  at MonoDevelop.Ide.TypeSystem.TypeSystemService.SerializeObject (System.String path, System.Object obj) [0x00033] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.7-branch/0f1da1e7/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs:623 
* Assertion at threads.c:1360, condition `internal' not met


If you require any more information, please let me know
Comment 1 Lluis Sanchez 2013-06-04 12:14:04 UTC
I tried to reproduce with no luck. Which arguments did you use when publishing the project? Is this something you can reproduce?
Comment 2 Dave Morris 2013-06-24 12:16:16 UTC
I am also seeing a similar error when I build using mdtool:

...
Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:162
  at MonoDevelop.Projects.CustomCommandExtension.Build (IProgressMonitor monitor, MonoDevelop.Projects.SolutionEntityItem entry, MonoDevelop.Projects.ConfigurationSelector configuration) [0x0004d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CustomCommandExtension.cs:49
  at MonoDevelop.Projects.ProjectServiceExtension.Build (IProgressMonitor monitor, IBuildTarget item, MonoDevelop.Projects.ConfigurationSelector configuration) [0x0000b] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:154
  at MonoDevelop.Projects.ProjectServiceExtension.RunTarget (IProgressMonitor monitor, IBuildTarget item, System.String target, MonoDevelop.Projects.ConfigurationSelector configuration) [0x00010] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs:114
  at MonoDevelop.Projects.SolutionItem.RunTarget (IProgressMonitor monitor, System.String target, MonoDevelop.Projects.ConfigurationSelector configuration) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs:475
  at MonoDevelop.Projects.BuildTool.Run (System.String[] arguments) [0x002a9] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/BuildTool.cs:137
  at MonoDevelop.Core.ApplicationService.StartApplication (System.String appId, System.String[] parameters) [0x0004c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core/ApplicationService.cs:48
  at MonoDevelopProcessHost.Main (System.String[] args) [0x00122] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.9-branch/f9c5c24e/source/monodevelop/main/src/tools/mdtool/src/mdtool.cs:81


* Assertion at threads.c:1360, condition `internal' not met
Comment 3 Neil Danson 2013-06-27 06:06:05 UTC
It's only happened once. The key steps seem to be

1: Add NEW project to bitbucket (while it is unavailable)
2: Xamarin Studio now sees as in source control *even though it isnt*
3: In order to add to bitbucket when it came back up I had to remove source control bindings. This is when the crash occurred and the data was lost.
Comment 4 Lluis Sanchez 2013-07-12 04:57:05 UTC
Hi Neil,

Which command did you use for step 3? I'm not sure what you mean by "remove source control bindings".
Comment 5 Lluis Sanchez 2013-07-12 04:58:30 UTC
This could be a dupe of bug 6014.
Comment 6 Neil Danson 2013-07-14 09:25:44 UTC
At the solution level right click -> Version Control -> remove

It could be related to that bug - the fact Xamarin crashed may have been incidental and that the bug above was the cause.
Comment 7 Lluis Sanchez 2013-07-16 05:29:59 UTC
Yep, so marking as duplicate.

*** This bug has been marked as a duplicate of bug 6014 ***