Bug 14528 - FileNotFoundException when closing with unsaved file
Summary: FileNotFoundException when closing with unsaved file
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: unspecified
Hardware: PC Windows
: High normal
Target Milestone: master
Assignee: Bugzilla
: 14972 ()
Depends on:
Reported: 2013-09-07 21:49 UTC by Mikayla Hutchinson [MSFT]
Modified: 2015-09-01 09:18 UTC (History)
3 users (show)

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:

Description Mikayla Hutchinson [MSFT] 2013-09-07 21:49:35 UTC
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\Michael\Documents\EmptyXmlFile.xml'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
   at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   at System.IO.FileSystemInfo.set_LastWriteTimeUtc(DateTime value)
   at System.IO.FileSystemInfo.set_LastWriteTime(DateTime value)
   at MonoDevelop.Ide.ProjectOperations.MarkFileDirty(String filename) in c:\Users\Michael\vcs\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\ProjectOperations.cs:line 531
   at MonoDevelop.Ide.Gui.SdiWorkspaceWindow.SetTitleEvent(Object sender, EventArgs e) in c:\Users\Michael\vcs\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\SdiWorkspaceWindow.cs:line 350
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at MonoDevelop.Ide.Gui.AbstractViewContent.OnContentNameChanged(EventArgs e) in c:\Users\Michael\vcs\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\AbstractViewContent.cs:line 152
   at MonoDevelop.Ide.Gui.AbstractViewContent.set_ContentName(String value) in c:\Users\Michael\vcs\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\AbstractViewContent.cs:line 53
   at MonoDevelop.Ide.Gui.Dialogs.DirtyFilesDialog..ctor() in c:\Users\Michael\vcs\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui.Dialogs\DirtyFilesDialog.cs:line 49
   at MonoDevelop.Ide.Gui.DefaultWorkbench.Close() in c:\Users\Michael\vcs\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\DefaultWorkbench.cs:line 708
   at MonoDevelop.Ide.Gui.DefaultWorkbench.OnClosing(Object o, DeleteEventArgs e) in c:\Users\Michael\vcs\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\DefaultWorkbench.cs:line 660
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)
   at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)
   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
Comment 1 Mike Krüger 2013-09-08 01:35:48 UTC
Comment 2 Prashant manu 2014-01-17 06:33:23 UTC
I have checked this issue with following builds:

All Windows
X.S 4.2.3(build 127)
X.S 4.12.0-8

I have tried to close solution which is having unsaved file. It gives a popup to save or close without save option before closing solution. This is the screencast for the same: http://screencast.com/t/B2oLFNlreVu8
Comment 3 Marius Ungureanu 2015-09-01 09:18:39 UTC
*** Bug 14972 has been marked as a duplicate of this bug. ***