• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Exiting non-POSIX threads?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exiting non-POSIX threads?


  • Subject: Re: Exiting non-POSIX threads?
  • From: Sean McBride <email@hidden>
  • Date: Tue, 30 Jul 2013 12:15:18 -0400
  • Organization: Rogue Research Inc.

On Tue, 30 Jul 2013 10:20:21 -0500, Ken Thomases said:

>>> All in all, what you're doing seems like a bad idea.
>>
>> Maybe but what is the right solution to this?
>
>Let the app crash.  Let the CrashReporter tell the user that it
>crashed.  If you want to receive the crash report yourself, use an
>external watchdog process or collect the crash report file on next launch.

Oleg's problem is basically the same as an issue I have.

Basically, when a Objective-C exception (from one's own code, third party libraries, or the OS) is thrown and not caught, the OS does what?  The answer depends on a few things:

 1) which thread did it happen on?
 2) have you called NSSetUncaughtExceptionHandler(), see:
<http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Exceptions/Concepts/UncaughtExceptions.html>
 3) the value of NSApplicationShowExceptions, see:
<http://lists.apple.com/archives/cocoa-dev/2012/Feb/msg00563.html>

The next question is: what would be nice to do in response?  Ideally, a UI would be shown allowing the user to submit the crash report over the internet.  Presenting this UI from the same process is probably a bad idea since the process is in a bad state.  So I guess the best thing to do is let the OS kill the process and create a crash log, which you can then read when you relaunch (modulo sandbox issues).

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Exiting non-POSIX threads? (From: Oleg Krupnov <email@hidden>)
 >Re: Exiting non-POSIX threads? (From: Oleg Krupnov <email@hidden>)
 >Re: Exiting non-POSIX threads? (From: Ken Thomases <email@hidden>)
 >Re: Exiting non-POSIX threads? (From: Oleg Krupnov <email@hidden>)
 >Re: Exiting non-POSIX threads? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Mixing Obj-C and C "methods"
  • Next by Date: Re: Mixing Obj-C and C "methods"
  • Previous by thread: Re: Exiting non-POSIX threads?
  • Next by thread: Re: Exiting non-POSIX threads?
  • Index(es):
    • Date
    • Thread