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                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to