My Xamarin.mac cocoa application includes native console application in the bundle and at some point it starts the console application with redirected standard input and output like this:
ProcessStartInfo pi = new ProcessStartInfo(apiProcessPath); pi.WorkingDirectory = workingDirectory; pi.Arguments = "0"; pi.UseShellExecute = false; pi.CreateNoWindow = true; pi.RedirectStandardOutput = true; pi.RedirectStandardError = true; pi.RedirectStandardInput = true; Process process = Process.Start(pi);
It works on my computer (Mac OS High Sierra - my application installed in the /Applications/...) but at customer's computer with the same OS installed also at the same folder the Process.Start throws this exception:
System.IO.IOException: Write fault on path /Applications/my app folder/Contents/Resources/[Unknown]
at System.IO.FileStream.WriteInternal (System.Byte src, System.Int32 offset, System.Int32 count) [0x000be] in /Library/Frameworks/Xamarin.Mac.framework/Versions/18.104.22.168/src/Xamarin.Mac/mcs/class/corlib/System.IO/FileStream.cs:658
at System.IO.FileStream.Write (System.Byte array, System.Int32 offset, System.Int32 count) [0x00090] in /Library/Frameworks/Xamarin.Mac.framework/Versions/22.214.171.124/src/Xamarin.Mac/mcs/class/corlib/System.IO/FileStream.cs:614
at System.IO.StreamWriter.Flush (System.Boolean flushStream, System.Boolean flushEncoder) [0x00042] in /Library/Frameworks/Xamarin.Mac.framework/Versions/126.96.36.199/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/io/streamwriter.cs:312
at System.IO.StreamWriter.set_AutoFlush (System.Boolean value) [0x00010] in /Library/Frameworks/Xamarin.Mac.framework/Versions/188.8.131.52/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/io/streamwriter.cs:336
at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0033e] in /Library/Frameworks/Xamarin.Mac.framework/Versions/184.108.40.206/src/Xamarin.Mac/mcs/class/System/System.Diagnostics/Process.cs:796
at System.Diagnostics.Process.Start () [0x0003a] in /Library/Frameworks/Xamarin.Mac.framework/Versions/220.127.116.11/src/Xamarin.Mac/mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs:2005
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001b] in /Library/Frameworks/Xamarin.Mac.framework/Versions/18.104.22.168/src/Xamarin.Mac/mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs:2476
Application was compiled with Visual Studio 7.5. I've also tried to update to 7.5.4, but result was the same (except release build seems to be less detailed in this case so I've posted original call stack).
I don't have access to that computer so I cannot debug it. It seems the /var/log/system.log shows nothing related to my application. Do you have idea what could be wrong? I've also created new testing application from scratch invoking just "/bin/cat" the same way but it worked.
All similar I could find was one unsolved SO question but it seems I cannot post the link. I'm not sure if i could post it as bug since it behaves differently on two computers, but unfortunately I cannot reproduce it so I ask here first. Thank you.