Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSData dataWithBytes problem on Intel



I'm having a problem specific to Intel based Macs using [NSData dataWithBytes:
length:]

Basically, if I do this:

NSData * dTempData = [NSData dataWithBytes:pBytes length:iLen];

and later on do this (nothing else is done with dTempData):

dTempData = [NSData dataWithBytes:pOtherBytes length:iOtherLen];


I will hit an endless loop (mach_msg_trap)

But only on Intel. Could someone explain why this works fine on PPC based macs?

I also found I could not do this:

[hTempFile writeData:[NSData dataWithBytes:pBytes length:iLen]]; 

without hitting the same trap. 

I've found that if I do this:

NSData * dTempData = [NSData dataWithBytes:pBytes length:iLen];

and later on do this:

NSData * dTempData2 = [NSData dataWithBytes:pOtherBytes length:iOtherLen];

then everything is fine for both Intel and PPC, but am worried I'm doing
something fundamentally wrong. PLEASE let me know if I'm doing something
terribly wrong here, I'm new at this!




 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.