• 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
archiving: Non-aligned pointer being freed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 unarchiveObjectWithData: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.


  • Follow-Ups:
    • Re: archiving: Non-aligned pointer being freed
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: -retain and -release Questions
  • Next by Date: Re: Best way to implement a modal window
  • Previous by thread: Re: -retain and -release Questions
  • Next by thread: Re: archiving: Non-aligned pointer being freed
  • Index(es):
    • Date
    • Thread