Re: How to catch and log EXC_BAD_ACCESS?
Re: How to catch and log EXC_BAD_ACCESS?
- Subject: Re: How to catch and log EXC_BAD_ACCESS?
- From: Michael Ash <email@hidden>
- Date: Mon, 26 Jan 2009 23:43:29 -0500
On Mon, Jan 26, 2009 at 12:09 PM, Scott Ribe <email@hidden> wrote:
>> Currently, the app just hangs and needs the user to send Force Quit to
>> terminate the app.
>
> You sure about that? It can take a while to prepare the crash report, and
> during that time your app is certainly non-responsive. But that signal
> causes the system to terminate your application, and I have ***NEVER*** seen
> that termination fail, not under any circumstances. In fact, if the system
> can't terminate the app after EXC_BAD_ACCESS, there would be no reason to
> expect the user to be able to force quit it either...
Actually it's pretty easy to avoid exiting due to EXC_BAD_ACCESS, just
install a signal handler for SIGSEGV.
Of course, doing something rational in such a signal handler is ever
so slightly non-trivial.
An initial force-quit can be easily blocked as well, install a handler
for SIGINT. If you force quit a process a second time the system goes
for SIGKILL, though, and you can't stop that one.
However this sort of thing generally is not done, so if your app
doesn't quit when you get an EXC_BAD_ACCESS it's probably because
you're not actually getting an EXC_BAD_ACCESS to begin with.
Mike
_______________________________________________
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