[MacRuby-devel] TIL - Uncaught exceptions in threads cause SIGABRT in the main thread!

Morgan Schweers cyberfox at gmail.com
Sun Mar 13 18:31:15 PDT 2011


Greetings,
Today I Learned :) if a thread throws an exception that isn't rescued by the
top of the thread, it'll crash the app's main thread with 'Program received
signal:  “SIGABRT”.'

That's been plaguing me since I started doing MacRuby development; every
time I tried to start up multiple threads, the app became incredibly fragile
and, unlike the main thread, it wouldn't show ruby traces.

Now I just wrap threads in begin/rescue blocks, and I'm all good.  Good
programming practice anyway, but the failure mode is unobvious if you don't.

Hopefully this helps someone else!

--  Morgan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110313/ac6e40e2/attachment.html>


More information about the MacRuby-devel mailing list