On Sep 29, 2010, at 2:41 AM, Markus Spoettl wrote:
> The the Mac code is 32bit and runs on Leopard and Snow Leopard.
> 
> - (void)encodeDouble:(double)value forKey:(NSString *)key withCoder:(NSCoder 
> *)encoder
> {
>    NSSwappedDouble sd = NSSwapHostDoubleToLittle(value);
>    [encoder encodeBytes:(const uint8_t *)&sd length:sizeof(NSSwappedDouble) 
> forKey:key];
> }
> 
> - (double)decodeDoubleForKey:(NSString *)key withCoder:(NSCoder *)decoder
> {
>    double result = 0.0;
>    NSUInteger retsize;
>    NSSwappedDouble *sd = (NSSwappedDouble *)[decoder decodeBytesForKey:key 
> returnedLength:&retsize];
>    if (retsize == sizeof(NSSwappedDouble)) {  // <=== crash
>        result = NSSwapLittleDoubleToHost(*sd);
>    }
>    return result;
> }


I just noticed the unfamiliar exception code EXC_ARM_DA_ALIGN. Googling it 
turns up that I'm not the only one experiencing the issue. I'll post a solution 
when I have it ready. Sorry for the noise.

Regards
Markus

--
__________________________________________
Markus Spoettl

_______________________________________________

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

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

Reply via email to