3

I recently noticed some frustrating issues on mac. my program simply, silently quits, without any error message and crash report.

I think the crash reporter is enabled, as I can still see it with some other access violation bug. I don't know how to debug this issue without a call stack dump. I had to put logs everywhere and I then realized that the program doesn't always quit at the same place.

the issue seems to be related to sockets, I'm not sure. I kinda think this is an OS bug, because if it is really my program that crashes, I should see the crash reporter. Also, I couldn't reproduce this issue with mac 10.8.5, but I could reproduce it with 10.9 and 10.10.

are you aware of an OS bug that may related to this? how am I suppose to approach this issue?

Bill Yan
  • 3,369
  • 4
  • 27
  • 42
  • 2
    You could try running the executable inside your app (Foo.app/Contents/MacOS/Foo) from a shell. When it exits, the shell may report that it was killed and by which signal. If not, you could `echo $?` to get the exit status. The result can be interpreted according to the [waitpid() man page](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/waitpid.2.html). That could provide a clue that may lead to the next step. – Ken Thomases Dec 02 '14 at 01:16
  • Thank you. shell doesn't report anything, but with echo $?, I saw the code 141. I will google what that means – Bill Yan Dec 02 '14 at 19:00
  • Thank you very much! after digging deeper, I found out that 141 means 141-128=13 SIGPIPE. it happens when we write to a broken socket. I found two other questions that are related to this, http://stackoverflow.com/questions/18880606/socket-connection-getting-closed-abruptly-with-code-141, http://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly . I don't know why people down grade my question, it is a valid question, I actually learnt from it. – Bill Yan Dec 02 '14 at 21:03
  • Thank you very much for this. I had a similar problem on OS X El Capitan (10.11.6) and [trying it from the shell](https://github.com/pkulchenko/ZeroBraneStudio/issues/760#issuecomment-298333250) immediately showed the proper error and underlying problem. – Tieske May 01 '17 at 13:55

0 Answers0