• 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: Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}}
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}}


  • Subject: Re: Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}}
  • From: glenn andreas <email@hidden>
  • Date: Wed, 13 Jul 2011 12:30:20 -0500

Are you decoding it from a 64 bit app?  Because CGRect on 64 bits is made of doubles, while on 32 bits (where it was probably encoded) it was made of floats....

Also, the exact format for @encode() varies greatly between compiler version (especially with regards for things like structure names vs ?, etc...).  This, in and of itself, shouldn't make it incompatible, but a structure with two structures each with two floats doesn't match with the double-based CGRect.

On Jul 13, 2011, at 12:20 PM, Philip Dow wrote:

> I am trying to decode a 3rd party archive encoded in the old NSArchiver (not keyed) format. At a point in the decoding, I expect to find a CGRect, but when I call
>
> [coder decodeValueOfObjCType:@encode(CGRect) at:&myRect]
>
> an exception is raised with the error:
>
> file inconsistency: read '{?={?=ff}{?=ff}}', expecting '{CGRect={CGPoint=dd}{CGSize=dd}}'
>
> Sure enough, if I open the file in a text editor, I see {?={?=ff}{?=ff}}.
>
> According to the docs, the curly braces indicate a structure is encoded, which I would expect for CGRect, but the ? indicates an unknown type. I'm stumped for a solution and was wondering if anyone might have an insight.
>
> ~Phil_______________________________________________
>
> 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

Glenn Andreas                      email@hidden
The most merciful thing in the world ... is the inability of the human mind to correlate all its contents - HPL

_______________________________________________

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: Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}}
      • From: Philip Dow <email@hidden>
References: 
 >Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}} (From: Philip Dow <email@hidden>)

  • Prev by Date: Cocoaheads Lake Forest meeting TONIGHT, 7pm, El Toro Library - Early Lion Celebration, Late WWDC wrapup
  • Next by Date: Re: Cocoa Touch: Accessory view never calls "up outside" action?
  • Previous by thread: Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}}
  • Next by thread: Re: Reading old NSArchiver serialization, expecting CGRect, finding {?={?=ff}{?=ff}}
  • Index(es):
    • Date
    • Thread