• 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: Bill Bumgarner <email@hidden>
  • Date: Mon, 26 Jan 2009 21:48:19 -0800

On Jan 26, 2009, at 8:43 PM, Michael Ash wrote:
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.

Hahahaha.... yeah. That is an understatement.

Before anyone thinks that handling SIGSEGV and recovering from it is a good idea.

It isn't. Don't do it unless you are prepared to invest a TON of time into doing so.

It isn't really even a good idea to try and *emergency save* the user's data.

SIGSEGV (like other such crashes) indicates that something has gone horribly wrong. Most likely, memory corruption has occurred. Thus, if you try to save anything, you will quite likely be saving corrupted data. You better had have a 100% bulletproof means of validating the data post-crash to determine what can be salvaged!!

Of the various projects I have worked on that tried to go down the "we'll detect crashes and recover!" path, every one of them would have achieved a far higher return-on-engineering-investment by focusing on creating working software instead.

b.bum



_______________________________________________

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: Jean-Daniel Dupas <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>)
 >Re: How to catch and log EXC_BAD_ACCESS? (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: Is there a more efficient way to get the first 4 bytes off a NSInputStream to compare
  • Next by Date: Re: Setting data cell type for a specific row
  • 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