• 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: Maximum size for NSFileWrapper serialization?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maximum size for NSFileWrapper serialization?


  • Subject: Re: Maximum size for NSFileWrapper serialization?
  • From: Sean McBride <email@hidden>
  • Date: Fri, 18 Jan 2013 17:48:59 -0500
  • Organization: Rogue Research Inc.

On Fri, 18 Jan 2013 13:18:52 -0800, Sebastien Boisvert said:

>I'm trying to initialize a NSFileWrapper with an existing file which is
>about 3.65GB (gigs), then get the NSData by serializing it, but get the
>following exception:
>
>MyApp[81289:303] can't write int larger than INT_MAX
>MyApp[81289:303] (
>0   CoreFoundation    0x00007fff8d4280a6 __exceptionPreprocess + 198
>1   libobjc.A.dylib   0x00007fff865d23f0 objc_exception_throw + 43
>2   CoreFoundation    0x00007fff8d427e7c +[NSException raise:format:] + 204
>3   Foundation        0x00007fff8886b643 -[NSAKSerializerStream
>writeInt:] + 59
>4   Foundation        0x00007fff8886b828 -[NSAKSerializerStream
>writeAlignedDataSize:] + 173
>5   Foundation        0x00007fff8886c3ef -[NSAKSerializer serializeData:] + 86
>6   Foundation        0x00007fff8886c38d -[NSAKSerializer
>serializeObject:] + 467
>7   Foundation        0x00007fff8886ff04 -[NSDocumentSerializer
>serializePListValueIn:key:value:] + 130
>8   Foundation        0x00007fff8886c7cf -[NSAKSerializer
>serializePropertyList:] + 447
>9   Foundation        0x00007fff8886c38d -[NSAKSerializer
>serializeObject:] + 467
>10  Foundation        0x00007fff8886df00 -[NSRTFD dataRepresentation] + 181
>11  Foundation        0x00007fff88868168 -[NSFileWrapper
>serializedRepresentation] + 562
>...
>
>
>Is there, in fact, a maximum size NSFileWrapper can handle? The docs
>aren't specific.

I fear you have answered your own question.  It looks like there is a 2 GiB limit somewhere... maybe not a limit of NSFileWrapper but of one of those private classes like NSAKSerializer.

I recently learned the hard way that NSKeyedArchiver is also limited to 2 GiB.

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

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


References: 
 >Maximum size for NSFileWrapper serialization? (From: Sebastien Boisvert <email@hidden>)

  • Prev by Date: Maximum size for NSFileWrapper serialization?
  • Next by Date: Re: UITapGestureRecognizer timeout
  • Previous by thread: Maximum size for NSFileWrapper serialization?
  • Next by thread: Re: How to add the cells(views) in a columnwise instead of Rowwise in PXListView?
  • Index(es):
    • Date
    • Thread