• 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: How to catch and log EXC_BAD_ACCESS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to catch and log EXC_BAD_ACCESS?
      • From: Bill Bumgarner <email@hidden>
    • Re: How to catch and log EXC_BAD_ACCESS?
      • From: Slava Pestov <email@hidden>
References: 
 >How to catch and log EXC_BAD_ACCESS? (From: Oleg Krupnov <email@hidden>)
 >Re: How to catch and log EXC_BAD_ACCESS? (From: Scott Ribe <email@hidden>)

  • Prev by Date: NSTextView.preferredPasteboardTypeFromArray
  • Next by Date: Re: Is there a more efficient way to get the first 4 bytes off a NSInputStream to compare
  • Previous by thread: Re: How to catch and log EXC_BAD_ACCESS?
  • Next by thread: Re: How to catch and log EXC_BAD_ACCESS?
  • Index(es):
    • Date
    • Thread