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