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: 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