• 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: Jeremy Dronfield <email@hidden>
  • Date: Thu, 3 Jun 2004 17:05:13 +0100

On 3 Jun 2004, at 4:10 pm, Douglas A. Welton wrote:

Jeremy,

When you say, "it doesn't work" do you mean that an exception not thrown OR
do you mean that your code did not do what it was supposed to do?

I mean that the exception isn't thrown. The unarchiver still crashes the app. I get exactly the same behaviour with the handler placed in a home-made -canBeUnarchived: method as you described:

- (BOOL)canBeUnarchived:(NSData *)Target_Data
{
id archive;
BOOL success = NO;

NS_DURING
archive = [NSUnarchiver unarchiveObjectWithData:Target_Data];
success = YES;
NS_HANDLER
success = NO;
NS_ENDHANDLER

return success;
}

It still crashes when the bad data is unarchived.

Regards,
-Jeremy
_______________________________________________
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>)

  • Prev by Date: Re: Ugly bug in Foundation, beware!
  • Next by Date: Re: Debugging under 10.2
  • Previous by thread: Re: Feeding NSUnarchiver bad data can cause crash
  • Next by thread: Re: Feeding NSUnarchiver bad data can cause crash
  • Index(es):
    • Date
    • Thread