3

I have a command line Mono application running on the Mac (OSX Lion) and it dies misteriously with the following message:

[1]    53342 trace trap  "/Library/Frameworks/Mono.framework/Versions/2.10.9/bin/mono" --debug  

read: -p: no coprocess

This is running the app from MonoDevelop.

Anyone has any idea what is happening and how I can fix this? (or how I can try to figure out what it is)

Maurício Linhares
  • 39,901
  • 14
  • 121
  • 158

2 Answers2

1

Neither how to fix it, nor how to figure out what it is, but to isolate the problem:

  • Run it outside MonoDevelop. If it works, report a bug to MonoDevelop.
  • Run it outside MonoDevelop with the latest version of Mono (2.11.3). If it still fails, file a bug to Mono.
  • (If you have access to a Linux box, try there too because it may be a bug in Mono that only affects Mac platform.)

Bugs are filed in http://bugzilla.xamarin.com/

knocte
  • 16,941
  • 11
  • 79
  • 125
0

In the end the issue was that there was code like this in the app:

#if DEBUG
    Debugger.Break();
#endif

The application was being compiled in Debug and I was running the app like this:

mono Cli.exe

And when the interpreter found this piece of code, there was no debugger available when the trap signal was sent. While on Windows a dialog is opened asking you if you want to debug the app, on MacOS the application just commits suicide. The fix was to not execute this code if running on a Mac (or running the app inside of GDB).

Maurício Linhares
  • 39,901
  • 14
  • 121
  • 158