Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feeding NSUnarchiver bad data can cause crash



>> I tried @try. NSUnarchiver crashes out of that too.

> You could try using a signal handler (not well versed in this myself at the
> moment) to trap the failure,

I'd be very wary of trying that. The problem here seems to be a crash (segmentation violation, bus error, etc), which is most often caused by reading or writing data where you shouldn't. The errant code could have easily overwritten important data in your app before hitting an address to cause the crash. If you try to resume from where you started, you could be dealing with bad data (and worse, storing corrupt data back to some persistent store).

I worked on a high-traffic webserver program that caught SIGSEGV and SIGBUS and tried to recover, but it caused more problems than it was worth.

Cheers,
++Mark Dalrymple, email@hidden. http://borkware.com
Live in Western Pennsylvania? Next CocoaHeads June 10. http://cocoaheads.org
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Feeding NSUnarchiver bad data can cause crash (From: "Douglas A. Welton" <email@hidden>)
 >Re: Feeding NSUnarchiver bad data can cause crash (From: Shawn Erickson <email@hidden>)
 >Re: Feeding NSUnarchiver bad data can cause crash (From: Jeremy Dronfield <email@hidden>)
 >Re: Feeding NSUnarchiver bad data can cause crash (From: Shawn Erickson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.