Problem with "save as" and freed managed object context
Problem with "save as" and freed managed object context
- Subject: Problem with "save as" and freed managed object context
- From: Gideon King <email@hidden>
- Date: Fri, 12 Mar 2010 18:50:22 +1000
Having sorted out the problem that occurred when I closed files, I am now back to the "save as" issue (I was hoping that the two problems were related, but apparently not). I have reverted to using a stock standard NSManagedObjectContext I still haven't a clue where to look to debug this. Running it normally gives the following error:
NovaMind5TP(3129,0x7fff70ee2be0) malloc: *** error for object 0x1149bdd30: pointer being freed was not allocated
(gdb) po 0x1149bdd30
<NSManagedObjectContext: 0x1149bdd30>
(gdb) bt
#0 0x00007fff87290951 in malloc_error_break ()
#1 0x00007fff871ba143 in free ()
#2 0x00007fff8439471b in _internal_object_dispose ()
#3 0x00007fff80e2d79a in -[NSObject(NSObject) dealloc] ()
#4 0x00007fff874e4ff1 in -[NSManagedObjectContext dealloc] ()
#5 0x00007fff874d40a3 in -[NSManagedObjectContext release] ()
#6 0x00007fff80e0e246 in _CFAutoreleasePoolPop ()
#7 0x00007fff8571a2f8 in -[NSAutoreleasePool drain] ()
#8 0x00007fff87528eb9 in -[NSPersistentStoreCoordinator migratePersistentStore:toURL:options:withType:error:] ()
#9 0x00007fff8654e7e2 in -[NSPersistentDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:] ()
#10 0x0000000100034301 in -[NMPersistentDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:] (self=0x1008c47f0, _cmd=0x7fff867f759e, absoluteURL=0x1149abb90, typeName=0x100819f50, saveOperation=1, absoluteOriginalContentsURL=0x1008056c0, error=0x7fff5fbfdea8) at /Users/gideon/Development/svn/trunk/mac/Source/NMPersistentDocument.m:403
#11 0x00007fff864240b2 in -[NSDocument _writeSafelyToURL:ofType:forSaveOperation:error:] ()
#12 0x00007fff864234b0 in -[NSDocument writeSafelyToURL:ofType:forSaveOperation:error:] ()
#13 0x00007fff8654d8f1 in -[NSPersistentDocument writeSafelyToURL:ofType:forSaveOperation:error:] ()
#14 0x00007fff8641e836 in -[NSDocument saveToURL:ofType:forSaveOperation:error:] ()
#15 0x00007fff864218e4 in -[NSDocument _saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:] ()
#16 0x00007fff8641eb17 in -[NSDocument saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:] ()
...
And instruments with zombies tells me:
# Category Event Type RefCt Timestamp Address Size Responsible Library Responsible Caller
0 NSManagedObjectContext Malloc 1 00:27.812 0x1204c3540 240 CoreData -[NSPersistentStoreCoordinator(_NSInternalMethods) _retainedAllMigratedObjectsInStore:toStore:]
1 NSManagedObjectContext Autorelease 00:28.009 0x1204c3540 0 CoreData -[NSPersistentStoreCoordinator(_NSInternalMethods) _retainedAllMigratedObjectsInStore:toStore:]
2 NSManagedObjectContext Zombie -1 00:28.011 0x1204c3540 0 CoreData -[NSManagedObjectContext(_NSInternalAdditions) _dispose:]
Has anyone got any suggestions as to where to look for the cause of this?
Thanks
Gideon
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden