• 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: Unarchiving issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unarchiving issues


  • Subject: Re: Unarchiving issues
  • From: Michael Ash <email@hidden>
  • Date: Sun, 1 Aug 2010 23:34:40 -0400

On Sun, Aug 1, 2010 at 3:30 PM, James Maxwell
<email@hidden> wrote:
> Hello All,
>
> I have a strange problem with NSKeyedArchiver/Unarchiver. I have a very complex object graph that I want to be persistent, independently of my document objects, so I'm archiving it into the user's application support folder. The root object for the archive is a class called Network, which basically stores very little, but does store the "Hierarchy" for the object graph, which is basically just a 2D NSMutableArray (though it's a pretty big one). When I unarchive my Network root object, and initWithCoder gets called in the Network class, the Hierarchy seems fine -- I can iterate over the objects, posting relevant data, and everything looks good. However, once the Network is loaded into the application, iterating over the loaded Network Hierarchy gives an exc_bad_access error. I'm using the same routine to post the data, so nothing's changed there.
> The data that's causing the problem is a float* array, saved using encodeBytes:length:forKey, and decoded using decodeBytesForKey:returnedLength:, which is how I've saved a number of similar float* arrays in the Hierarchy.
> What I don't understand is how the Hierarchy can be fine at the end of the Network's initWithCoder method, but then get banjaxed somehow after that.

Post your code. It's *much* easier to debug code than a loose
description of code.

Mike
_______________________________________________

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

  • Follow-Ups:
    • Re: Unarchiving issues
      • From: James Maxwell <email@hidden>
References: 
 >Unarchiving issues (From: James Maxwell <email@hidden>)

  • Prev by Date: Odd problem with UIView touch handling
  • Next by Date: Re: How troubleshoot when Managed Object disappears from Store?
  • Previous by thread: Re: Unarchiving issues
  • Next by thread: Re: Unarchiving issues
  • Index(es):
    • Date
    • Thread