• 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: Feeding NSUnarchiver bad data can cause crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feeding NSUnarchiver bad data can cause crash


  • Subject: Re: Feeding NSUnarchiver bad data can cause crash
  • From: Mark Dalrymple <email@hidden>
  • Date: Thu, 3 Jun 2004 13:35:28 -0400

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

  • Prev by Date: Re: Ugly bug in Foundation, beware!
  • Next by Date: Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
  • Previous by thread: Re: Feeding NSUnarchiver bad data can cause crash
  • Next by thread: Exception support (was: Feeding NSUnarchiver bad data can cause crash)
  • Index(es):
    • Date
    • Thread