Bug 12337 - Unexpected error
Summary: Unexpected error
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
: 15093 ()
Depends on:
Blocks:
 
Reported: 2013-05-22 05:06 UTC by Roman Deputat
Modified: 2017-11-20 06:22 UTC (History)
7 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 Roman Deputat 2013-05-22 05:06:43 UTC
Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" -v --cache "/Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/obj/iPhoneSimulator/Debug/mtouch-cache" --nomanifest --nosign -sim "/Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app" -r "/Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/Lib/GoogleMaps.dll" -r "/Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/Lib/Newtonsoft.Json.MonoTouch.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" -r "/Developer/MonoTouch/usr/lib/mono/2.1/MonoTouch.Dialog-1.dll" -debug -nolink -sdk "5.1" -targetver "5.1" --abi=i386 "/Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.exe"
MonoTouch Business version 6.2.5 using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
Copied /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.exe to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/HelsingFestApp.exe
Copied /Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/mscorlib.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/System.Core.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/System.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/Mono.Security.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/Mono.Security.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/monotouch.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/System.Xml.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/MonoTouch.Dialog-1.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/MonoTouch.Dialog-1.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Json.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/System.Json.dll
Copied /var/folders/gg/wm_1mm3s4hn4bf9b5_2xbmdw0000gn/T/tmp74ded7b6.tmp/GoogleMaps.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/GoogleMaps.dll
Copied /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/Lib/Newtonsoft.Json.MonoTouch.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/Newtonsoft.Json.MonoTouch.dll
Copied /Developer/MonoTouch/usr/lib/mono/2.1/System.Runtime.Serialization.dll to /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/System.Runtime.Serialization.dll
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc  -Wl,-no_pie -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=5.1 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk  /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/obj/iPhoneSimulator/Debug/mtouch-cache/main.i386.cache.hi0yPDTRg+yr6wFKZXSbYuyl1Ew=.o -o /var/folders/gg/wm_1mm3s4hn4bf9b5_2xbmdw0000gn/T/tmp74ded7b6.tmp/HelsingFestApp -framework CFNetwork -framework AssetsLibrary -framework Accounts -framework CoreBluetooth -framework CoreTelephony -framework EventKit -framework EventKitUI -framework Foundation -framework CoreMotion -framework GameKit -framework GLKit -framework iAd -framework MapKit -framework MediaPlayer -framework MessageUI -framework NewsstandKit -framework OpenGLES -framework StoreKit -framework Twitter -framework UIKit -framework AddressBookUI -framework AudioToolbox -framework SystemConfiguration -framework AddressBook -framework AVFoundation -framework QuartzCore -framework CoreData -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreText -framework ImageIO -framework MobileCoreServices -framework Security -framework CoreMedia -framework CoreMIDI -framework CoreVideo -framework ExternalAccessory -framework QuickLook -lz -liconv -u _mono_pmip -u _monotouch_create_managed_ref -u _monotouch_release_managed_ref -u _monotouch_IntPtr_objc_msgSend_IntPtr -u _monotouch_IntPtr_objc_msgSendSuper_IntPtr -u _CloseZStream -u _CreateZStream -u _Flush -u _ReadZStream -u _WriteZStream -lmono-2.0 -lmonotouch-debug -L/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib -u _catch_exception_raise  -force_load /var/folders/gg/wm_1mm3s4hn4bf9b5_2xbmdw0000gn/T/tmp74ded7b6.tmp/GoogleMaps -ObjC -lz -licucore -lc++ -force_load /var/folders/gg/wm_1mm3s4hn4bf9b5_2xbmdw0000gn/T/tmp74ded7b6.tmp/libGoogleMapsExporter.a
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.IO.IOException: Sharing violation on path /Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/MonoTouchSimulatorAssemblies.list
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool,System.Text.Encoding)
  at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0 
  at System.IO.File.WriteAllText (System.String path, System.String contents) [0x00000] in <filename unknown>:0 
  at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0
Comment 1 Sebastien Pouliot 2013-05-22 08:54:14 UTC
Can you confirm your current user has write access to `/Volumes/AlProjects/Helsingborgsfestivalen2013/Source/IPhone/HelsingFest.App/bin/iPhoneSimulator/Debug/HelsingFestApp.app/MonoTouchSimulatorAssemblies.list` ? e.g. could a read-only version of the file exists ?

and that nothing else was using the same file at the same time ? e.g. could it be a network/shared drive ?
Comment 2 PJ 2013-11-19 17:06:01 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 3 PJ 2013-12-05 18:36:30 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.
Comment 4 Miljenko Cvjetko Mel 2016-01-13 14:23:42 UTC
I use FAT32 nano usb3 thumbs to switch between Windows and MacOSX boxes.

Create empty iOS App (Single View) and start it.

Error:

MTOUCH: error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
		System.IO.IOException: Sharing violation on path /Volumes/FAT_REPOS/FAT32MountedDriveMTouchSharingViolation/obj/iPhoneSimulator/Debug/mtouch-cache/entry-points.txt
		  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) <0x108315dd0 + 0x00827> in <filename unknown>:0 
		  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) <0x10bc09c10 + 0x00055> in <filename unknown>:0 
		  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
		  at System.IO.StreamWriter.CreateFile (System.String path, Boolean append, Boolean checkHost) <0x10bc099f0 + 0x000b4> in <filename unknown>:0 
		  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize, Boolean checkHost) <0x10bc09830 + 0x0007c> in <filename unknown>:0 
		  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) <0x10bc097d0 + 0x0003d> in <filename unknown>:0 
		  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding) <0x10bc0b830 + 0x00033> in <filename unknown>:0 
		  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool,System.Text.Encoding)
		  at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) <0x10bc0b6c0 + 0x00053> in <filename unknown>:0 
		  at System.IO.File.WriteAllText (System.String path, System.String contents) <0x10bc0b670 + 0x00032> in <filename unknown>:0 
		  at MonoTouch.Target.GetRequiredSymbols () <0x10bc0a370 + 0x0029b> in <filename unknown>:0 
		  at MonoTouch.Application+<GetRequiredSymbols>c__Iterator0.MoveNext () <0x10bc09e30 + 0x001cf> in <filename unknown>:0 
		  at MonoTouch.Application.WriteSymbolList (System.String filename) <0x10bc09430 + 0x000fd> in <filename unknown>:0 
		  at MonoTouch.Application.StripNativeCode (System.String name) <0x10bc09260 + 0x00199> in <filename unknown>:0 
		  at MonoTouch.Application.StripNativeCode () <0x10bc090a0 + 0x00159> in <filename unknown>:0 
		  at MonoTouch.Application.Build () <0x108367050 + 0x00143> in <filename unknown>:0 
		  at MTouch.Main2 (System.String[] args) <0x108279b00 + 0x074c7> in <filename unknown>:0 
		  at MTouch.Main (System.String[] args) <0x1081cae60 + 0x00069> in <filename unknown>:0 
		Tool /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch execution finished.
	Task "MTouch" execution -- FAILED



/Volumes/FAT_REPOS/ is FAT32 filesystem

Miguel was right here it is filesystem mount error:

http://stackoverflow.com/questions/17107262/can-not-debug-app-in-ios-device-with-xamarin-studio
Comment 5 Miljenko Cvjetko Mel 2016-01-13 15:14:30 UTC
=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 7f42cd6c-f6c2-47c4-960b-ba19ea98bebf
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Version: 0.0.0.0
Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

=== Apple Developer Tools ===

Xcode 7.1.1 (9081)
Build 7B1005

=== Xamarin.iOS ===

Version: 9.4.0.0 (Business Edition)
Hash: 7322991
Branch: master
Build date: 2015-12-08 16:20:29-0500

=== Xamarin.Mac ===

Version: 2.4.0.109 (Business Edition)

=== Xamarin.Android ===

Version: 6.0.0.34 (Business Edition)
Android SDK: /Users/moljac/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.11.2
Darwin mumuco.local 15.2.0 Darwin Kernel Version 15.2.0
    Fri Nov 13 19:56:56 PST 2015
    root:xnu-3248.20.55~2/RELEASE_X86_64 x86_64
Comment 6 Sebastien Pouliot 2016-01-13 19:58:29 UTC
*** Bug 15093 has been marked as a duplicate of this bug. ***
Comment 7 Paul Johnson 2016-01-27 10:27:51 UTC
I'm seeing something very similar when moving long filename files between directories on the iOS simulator and on a 5S. I'm getting this

2016-01-27 10:12:22.077 turtlewax.iOS[11689:483993] Moving /Users/PFJ/Library/Developer/CoreSimulator/Devices/C4FD7442-65CE-492F-8FA3-48677D50D7ED/data/Containers/Data/Application/03898FB2-F848-458A-83DF-D4E844B8B6F5/Documents/_0004_3098_FG7736_GREEN_LINE_FRESH_SHINE_CITRUS_500ml_Aerosol_NL_FR_DE.mp4 to /Users/PFJ/Library/Developer/CoreSimulator/Devices/C4FD7442-65CE-492F-8FA3-48677D50D7ED/data/Containers/Data/Application/03898FB2-F848-458A-83DF-D4E844B8B6F5/Documents/1_ImageRecognition_2_MultipleTargets/videos/_0004_3098_FG7736_GREEN_LINE_FRESH_SHINE_CITRUS_500ml_Aerosol_NL_FR_DE.mp4
2016-01-27 10:12:22.079 turtlewax.iOS[11689:483993] No, that failed - Sharing violation on path /Users/PFJ/Library/Developer/CoreSimulator/Devices/C4FD7442-65CE-492F-8FA3-48677D50D7ED/data/Containers/Data/Application/03898FB2-F848-458A-83DF-D4E844B8B6F5/Documents/_0004_3098_FG7736_GREEN_LINE_FRESH_SHINE_CITRUS_500ml_Aerosol_NL_FR_DE.mp4:

=== Xamarin Studio ===

Version 5.10.2 (build 55)
Installation UUID: 728e2a5d-c6a2-4d84-a931-ee64cb78694c
Runtime:
	Mono 4.2.2 (explicit/996df3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402020030

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.1.24 (Business Edition)
Hash: 47eb74b4
Branch: master
Build date: 2016-01-20 17:06:01-0500

=== Xamarin.Android ===

Version: 6.0.1.9 (Business Edition)
Android SDK: /Users/PFJ/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.4.1.6 (Starter Edition)

=== Build Information ===

Release ID: 510020055
Git revision: 7c95611a8097853826b8ee411887a1f88cf83add
Build date: 2016-01-19 22:23:27-05
Xamarin addins: 9816bee7ff5ab3845ef51354dc687010422beb68
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.11.4
Darwin Pauls-MacBook-Pro.local 15.4.0 Darwin Kernel Version 15.4.0
    Sun Jan  3 21:35:22 PST 2016
    root:xnu-3248.40.155~11/RELEASE_X86_64 x86_64
Comment 8 Rolf Bjarne Kvinge [MSFT] 2016-02-08 14:09:35 UTC
@Paul, your issue is different, this bug is about using a thumb drive with a FAT file system. Please open a new bug for your problem.
Comment 9 Rolf Bjarne Kvinge [MSFT] 2016-02-08 14:23:17 UTC
This is really a bug in mono with FAT file systems and zero-length files.

In any case I've worked around it.

maccore/master: 151ed3967e149af1e37055b1524816347bf1fbbc
Comment 10 Joshua Wedekind 2017-11-18 06:36:48 UTC
Any chance Rolf's fix will make it into the latest Xamarin for Visual Studio CE for Mac?

These Xamarin projects take a huge toll on HDD space, and I'd like to use my external SSD.
Comment 11 Rolf Bjarne Kvinge [MSFT] 2017-11-20 06:22:44 UTC
@Joshua, the fix is a year old, so it's already in the latest version for Xamarin.iOS.

If you still have problems, please file a new bug and we'll have a look.