I've been porting a windows app to MacOS using Xamarin.Mac and so far it's been going very well. I finished the initial version and built a release version, then tried to run it outside of Visual Studio, and it crashes. The very same build does not crash if launched through Visual Studio (even with "Run without debugging"). Also, if I run the executible directly using Terminal it also works perfectly fine.
Using MacOS Mojave 10.14 / Xamarin.Mac 5.2
My best guess is it has something to do with this code:
let ffmpeg = new Process () ffmpeg.StartInfo.FileName <- "ffmpeg" ffmpeg.StartInfo.Arguments <- arguments ffmpeg.StartInfo.CreateNoWindow <- true ffmpeg.StartInfo.RedirectStandardOutput <- true ffmpeg.StartInfo.UseShellExecute <- false ffmpeg.StartInfo.RedirectStandardError <- true ffmpeg.Start() |> ignore
ffmpeg is in my PATH and if it was an issue with that, should it not be crashing when ran through VS/Terminal?
The other possibility I've thought of is it has something to do with stdout not being available somehow when the app is ran normally?
The app starts up fine, it's only when I click the button that calls the code above that it crashes.
Any thoughts on what this might be and how to fix it? Any help would be greatly appreciated!