Bug 13546 - Write fault on path - Unexpected error
Summary: Write fault on path - Unexpected error
Status: RESOLVED NORESPONSE
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer ()
Version: 3.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-07-29 02:02 UTC by Mohib Sheth
Modified: 2017-07-07 21:03 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Log files from Yiannis (11.12 KB, application/zip)
2013-10-16 01:09 UTC, Prashant Cholachagudda
Details


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 GitHub or Developer Community 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 NORESPONSE

Description Mohib Sheth 2013-07-29 02:02:02 UTC
I keep getting this error a lot many times and won't go away until I restart Xamarin Studio. Here's a stacktrace...


Building: XibFree (Debug)
Performing main compilation...
Skipping project since output files are up to date
Build complete -- 0 errors, 0 warnings

Building: Demo (Debug|iPhoneSimulator)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/3.1.2/bin/mcs /noconfig "/r:/Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll" -nostdlib "/out:/Users/mohibsheth/Projects/XibFree/Demo/bin/iPhoneSimulator/Debug/CodeOnlyLayout.exe" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" "/r:/Users/mohibsheth/Projects/XibFree/XibFree/bin/Debug/XibFree.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 "/define:DEBUG;__MOBILE__;__IOS__"  /t:exe "/Users/mohibsheth/Projects/XibFree/Demo/Main.cs" "/Users/mohibsheth/Projects/XibFree/Demo/AppDelegate.cs" "/Users/mohibsheth/Projects/XibFree/Demo/MainViewController.cs" "/Users/mohibsheth/Projects/XibFree/Demo/FrameLayoutDemo.cs" "/Users/mohibsheth/Projects/XibFree/Demo/LinearLayoutDemo.cs" "/Users/mohibsheth/Projects/XibFree/Demo/TableViewCellDemo.cs" "/Users/mohibsheth/Projects/XibFree/Demo/Demo1.cs" "/Users/mohibsheth/Projects/XibFree/Demo/TableViewCellDemo2.cs" "/Users/mohibsheth/Projects/XibFree/Demo/NestedDemo.cs" "/Users/mohibsheth/Projects/XibFree/Demo/ViewGroupLayerDemo.cs" "/Users/mohibsheth/Projects/XibFree/Demo/VisibilityDemo.cs" "/Users/mohibsheth/Projects/XibFree/Demo/RecalculateLayoutDemo.cs" "/Users/mohibsheth/Projects/XibFree/Demo/FullScreenDemo.cs" 
Compilation succeeded - 1 warning(s)

/Users/mohibsheth/Projects/XibFree/Demo/AppDelegate.cs(17,26): warning CS0169: The private field `Demo.AppDelegate.navigationController' is never used


Build complete -- 0 errors, 1 warning

Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode5-DP3.app/Contents/Developer" --cache "/Users/mohibsheth/Projects/XibFree/Demo/obj/iPhoneSimulator/Debug/mtouch-cache" --nomanifest --nosign -sim "/Users/mohibsheth/Projects/XibFree/Demo/bin/iPhoneSimulator/Debug/Demo.app" -r "/Users/mohibsheth/Projects/XibFree/XibFree/bin/Debug/XibFree.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -debug -nolink -sdk "7.0" -targetver "4.3" --abi=i386 "/Users/mohibsheth/Projects/XibFree/Demo/bin/iPhoneSimulator/Debug/CodeOnlyLayout.exe"
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.IO.IOException: Write fault on path /Users/mohibsheth/Projects/XibFree/Demo/bin/iPhoneSimulator/Debug/[Unknown]
  at System.IO.FileStream.WriteInternal (System.Byte[] src, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream.Write (System.Byte[] array, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter.FlushBytes () [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter.Decode () [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter.FlushCore () [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter.Flush () [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter.Close () [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Dispose (Boolean disposing) [0x00000] in <filename unknown>:0 
  at System.ComponentModel.Component.Dispose () [0x00000] in <filename unknown>:0 
  at MTouch.RunCommand (System.String path, System.String args, System.String[] env, System.Func`2 processOutput, System.String input) [0x00000] in <filename unknown>:0 
  at MonoTouch.CompileTask.Compile () [0x00000] in <filename unknown>:0 
  at MonoTouch.MainTask.Build () [0x00000] in <filename unknown>:0 
  at MonoTouch.BuildTask.Execute () [0x00000] in <filename unknown>:0 
  at MonoTouch.Application.<Compile>m__14 (MonoTouch.BuildTask v) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey56`1[MonoTouch.BuildTask].<>m__55 (MonoTouch.BuildTask e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey55`2[MonoTouch.BuildTask,System.Object].<>m__53 () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0 

---------------------- Done ----------------------

Build: 1 error, 1 warning
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-07-29 19:27:59 UTC
Can you try with the 6.4 release to see if it still happens? I believe it should be fixed there.
Comment 2 Mohib Sheth 2013-07-30 00:22:58 UTC
I am on the latest Alpha release. Here's the info.

=== Xamarin Studio ===

Version 4.1.7 (build 87)
Installation UUID: 06a0fec5-8371-4b1e-b7a9-518333973f31
Runtime:
	Mono 3.2.0 ((no/7c7fcc7)
	GTK 2.24.20
	GTK# (2.12.0.0)
	Package version: 302000000

=== Apple Developer Tools ===

Xcode 5.0 (3325.22)
Build 5A11344j

=== Xamarin.iOS ===

Version: 6.9.4.40 (Trial Edition)
Hash: 7f9e851
Branch: 
Build date: 2013-10-07 12:10:26-0400

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.8.0 (Trial Edition)
Android SDK: /Users/mohibsheth/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
Java SDK: /usr
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

=== Build Information ===

Release ID: 401070087
Git revision: e8d353852416693588e6e53a5c2b2d70e5ddadfb
Build date: 2013-07-18 15:32:11+0000
Xamarin addins: 7a764a450cd980c7942b91f12ac36947f9c6a71f

=== Operating System ===

Mac OS X 10.8.4
Darwin MacMini.local 12.4.0 Darwin Kernel Version 12.4.0
    Wed May  1 17:57:12 PDT 2013
    root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
Comment 3 Rolf Bjarne Kvinge [MSFT] 2013-07-30 06:46:43 UTC
Please try 6.4 to see if it still happens with the stable version, there are many fixes in 6.4 which haven't reached 6.9 yet.
Comment 4 Yiannis 2013-10-14 20:15:25 UTC
I am also getting a similar error at least once every 10 minutes, that appears as I type on the Xamarin IDE, or when I press the "." dot near a property, or when I press "command" + "return". The error appears when I am doing something in the code editor.
Xamarin displays an error dialog with title: "A fatal error has occurred"
and bellow that:
"Details of errors, along with anonymous installation information, can be sent to Xamarin to help improve Xamarin Studio. Do you wish to send this information?"

And the following details:

System.IO.IOException: Write fault on path //[Unknown]
  at System.IO.FileStream.WriteInternal (System.Byte[] src, Int32 offset, Int32 count) [0x00097] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.IO/FileStream.cs:651 
  at System.IO.FileStream.Write (System.Byte[] array, Int32 offset, Int32 count) [0x000aa] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.IO/FileStream.cs:627 
  at System.IO.StreamWriter.FlushBytes () [0x00043] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.IO/StreamWriter.cs:222 
  at System.IO.StreamWriter.Decode () [0x0000c] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.IO/StreamWriter.cs:229 
  at System.IO.StreamWriter.FlushCore () [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.IO/StreamWriter.cs:201 
  at System.IO.StreamWriter.Flush () [0x00006] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.IO/StreamWriter.cs:195 
  at System.IO.StreamWriter.Dispose (Boolean disposing) [0x00012] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.IO/StreamWriter.cs:178 
  at System.IO.StreamWriter.Close () [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/corlib/System.IO/StreamWriter.cs:408 
  at System.Diagnostics.Process.Dispose (Boolean disposing) [0x000a2] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/System/System.Diagnostics/Process.cs:1581 
  at MonoDevelop.Core.Execution.ProcessWrapper.Dispose (Boolean disposing) [0x0007c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.13-branch/07afec66/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessWrapper.cs:118 
  at System.Diagnostics.Process.Finalize () [0x00000] in /private/tmp/source/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-3.2.3/mcs/class/System/System.Diagnostics/Process.cs:1601 


=================


 Here is my system info:

=== Xamarin Studio ===

Version 4.0.13 (build 38)
Installation UUID: .......
Runtime:
	Mono 3.2.3 ((no/8d3b4b7)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302030000

=== Apple Developer Tools ===

Xcode 5.0 (3332.25)
Build 5A1413

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: 7.0.2.7 (Business Edition)
Hash: 57edee2
Branch: 
Build date: 2013-04-10 18:05:51-0400

=== Xamarin.Android ===

Not Installed

=== Build Information ===

Release ID: 400130038
Git revision: 07afec667f7be5d0ee511eb7115bbac6377fbae8
Build date: 2013-09-24 08:53:29+0000
Xamarin addins: 61140345a5b109633a94409edcbc7a4c19a425c6

=== Operating System ===

Mac OS X 10.8.5
Darwin .....-MacBook-Pro.local 12.5.0 Darwin Kernel Version 12.5.0
    Sun Sep 29 13:33:47 PDT 2013
    root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Comment 5 Mikayla Hutchinson [MSFT] 2013-10-15 13:23:24 UTC
Looks like the problem is in System.Diagnostics.Process.Dispose.
Comment 6 Prashant Cholachagudda 2013-10-16 01:09:53 UTC
Created attachment 5149 [details]
Log files from Yiannis
Comment 7 Bart King 2014-02-11 06:38:12 UTC
This error has recently started appearing for me since installing the 4.2.3 beta of Xamarin Studio.

There seems to be no pattern to these errors - the IDE can be entirely idle (even background) and the error window will pop up. I have seen it appear while typing, while copying code, while using the assembly browser. It will appear at least once a day.

Just looking in Ide.log shows the following, which may be related. Around this time, I clicked Stop in the IDE after running my app in the iOS simulator...

ERROR [2014-02-11 11:19:34Z]: Failed to launch a thread to wait for the process to exit
System.InvalidOperationException: Process instance not available
  at Mono.Debugger.Soft.VirtualMachine.get_Process () [0x0002a] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/f3fd2a85/source/monodevelop/main/external/debugger-libs/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs:47 
  at Mono.Debugging.Soft.SoftDebuggerSession.QueueEnsureExited () [0x00021] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/f3fd2a85/source/monodevelop/main/external/debugger-libs/Mono.Debugging.Soft/SoftDebuggerSession.cs:625 
ERROR [2014-02-11 11:19:34Z]: Error signaling the mtouch process to exit
System.IO.IOException: Write fault on path //[Unknown]
  at System.IO.FileStream.WriteInternal (System.Byte[] src, Int32 offset, Int32 count) [0x00097] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/FileStream.cs:651 
  at System.IO.FileStream.Write (System.Byte[] array, Int32 offset, Int32 count) [0x000aa] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/FileStream.cs:627 
  at System.IO.StreamWriter.FlushBytes () [0x00043] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:222 
  at System.IO.StreamWriter.FlushCore () [0x00012] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:203 
  at System.IO.StreamWriter.Write (System.Char[] buffer) [0x00022] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:390 
  at System.IO.TextWriter.WriteLine () [0x00000] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/TextWriter.cs:257 
  at MonoDevelop.Debugger.Soft.IPhone.IPhoneDebuggerSession.EndProcess () [0x00025] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/f3fd2a85/source/md-addins/MonoDevelop.IPhone/MonoDevelop.Debugger.Soft.IPhone/IPhoneDebuggerSession.cs:194 

This was shortly followed by:

ERROR [2014-02-11 11:21:11Z]: VersionControl returned 2 items for /path/to/file.cs
ERROR [2014-02-11 11:21:11Z]: The infos were: /path ::: /path/to/file.cs
ERROR [2014-02-11 11:21:11Z]: 
System.InvalidOperationException: Sequence contains more than one matching element
  at System.Linq.Enumerable.Single[VersionInfo] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00038] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/System.Core/System.Linq/Enumerable.cs:2370 
  at System.Linq.Enumerable.Single[VersionInfo] (IEnumerable`1 source) [0x00006] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/System.Core/System.Linq/Enumerable.cs:2387 
  at MonoDevelop.VersionControl.Repository.GetVersionInfo (FilePath localPath, VersionInfoQueryFlags queryFlags) [0x00090] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/f3fd2a85/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs:161 
  at MonoDevelop.VersionControl.Views.SubviewAttachmentHandler.HandleDocumentChanged (System.Object sender, System.EventArgs e) [0x000c1] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/f3fd2a85/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/SubviewAttachmentHandler.cs:68 
ERROR [2014-02-11 11:21:14Z]: An unhandled exception has occured. Terminating MonoDevelop? True
System.IO.IOException: Write fault on path //[Unknown]
  at System.IO.FileStream.WriteInternal (System.Byte[] src, Int32 offset, Int32 count) [0x00097] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/FileStream.cs:651 
  at System.IO.FileStream.Write (System.Byte[] array, Int32 offset, Int32 count) [0x000aa] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/FileStream.cs:627 
  at System.IO.StreamWriter.FlushBytes () [0x00043] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:222 
  at System.IO.StreamWriter.Decode () [0x0000c] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:229 
  at System.IO.StreamWriter.FlushCore () [0x00000] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:201 
  at System.IO.StreamWriter.Flush () [0x00006] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:195 
  at System.IO.StreamWriter.Dispose (Boolean disposing) [0x00012] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:178 
  at System.IO.StreamWriter.Close () [0x00000] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/corlib/System.IO/StreamWriter.cs:408 
  at System.Diagnostics.Process.Dispose (Boolean disposing) [0x000a2] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/System/System.Diagnostics/Process.cs:1581 
  at MonoDevelop.Core.Execution.ProcessWrapper.Dispose (Boolean disposing) [0x0007c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/f3fd2a85/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessWrapper.cs:119 
  at System.Diagnostics.Process.Finalize () [0x00000] in /private/tmp/source/bockbuild-mono-3.2.6/profiles/mono-mac-xamarin/build-root/mono-3.2.6/mcs/class/System/System.Diagnostics/Process.cs:1601 

Note that even though the window says Studio was terminated, it was not and continues to run.
Comment 8 Ludovic Henry 2017-07-07 21:03:10 UTC
Can you still reproduce this bug with latest version of mono? Please feel free to reopen if that is still the case. Thank you.