archiving: Non-aligned pointer being freed
archiving: Non-aligned pointer being freed
- Subject: archiving: Non-aligned pointer being freed
- From: Marius Kintel <email@hidden>
- Date: Mon, 5 Apr 2004 06:10:20 +0200
Hi,
When running the minimal foundation tool below, I get the following error
message when unarchiving:
*** malloc[23918]: error for object 0x300999: Non-aligned pointer being freed
This seems to happen if I use an NSValue as a value object for a dictionary
entry. Any other object I've tried works perfectly.
I've tried the following but without any effect:
o Use different ways of creating an NSValue
o Archive to file instead of NSData
o Turn off ZeroLink, Fix&Cont., predictive compilation
Does anyone have any idea why this happens and if I should worry about it?
I've only tested this under the latest Panther w/latest development tools.
-------
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
int val = 123;
NSValue *nsval = [NSValue value:&val withObjCType:@encode(int)];
[dict setObject:nsval forKey:@"test"];
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:dict];
[NSKeyedUnarchiver unarchiveObjectWith
Data:data];
[pool release];
return 0;
}
Thanks,
~/= Marius
--
We are Elektropeople for a better living.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.