I think I've narrowed it down a bit - it is now to the stage where the crash is 
at:

#0  0x00007fff80ddf788 in CFRetain ()
#1  0x00007fff874ed6ad in +[NSTemporaryObjectID classForStore:] ()
#2  0x00007fff874ed352 in _PFFastStoreTemporaryIDClass ()
#3  0x00007fff874ed2f8 in -[NSTemporaryObjectID _setPersistentStore:] ()
#4  0x00007fff87507b12 in -[NSPersistentStoreCoordinator(_NSInternalMethods) 
_assignObject:toPersistentStore:forConfiguration:] ()
#5  0x00007fff8752b323 in -[NSPersistentStoreCoordinator(_NSInternalMethods) 
_retainedAllMigratedObjectsInStore:toStore:] ()
#6  0x00007fff87528e54 in -[NSPersistentStoreCoordinator 
migratePersistentStore:toURL:options:withType:error:] ()
#7  0x00007fff8654e7e2 in -[NSPersistentDocument 
writeToURL:ofType:forSaveOperation:originalContentsURL:error:] ()
#8  0x0000000100034775 in -[NMPersistentDocument 
writeToURL:ofType:forSaveOperation:originalContentsURL:error:] 
(self=0x103e4ede0, _cmd=0x7fff867f759e, absoluteURL=0x119ee6dd0, 
typeName=0x10081aa30, saveOperation=1, absoluteOriginalContentsURL=0x1161bd310, 
error=0x7fff5fbfde78) at 
/Users/gideon/Development/svn/trunk/mac/Source/NMPersistentDocument.m:417
#9  0x00007fff864240b2 in -[NSDocument 
_writeSafelyToURL:ofType:forSaveOperation:error:] ()
#10 0x00007fff864234b0 in -[NSDocument 
writeSafelyToURL:ofType:forSaveOperation:error:] ()
#11 0x00007fff8654d8f1 in -[NSPersistentDocument 
writeSafelyToURL:ofType:forSaveOperation:error:] ()

Which would seem to imply that somehow either my registration of my store class 
is getting lost along the way, or maybe the reload thinks it's a different 
store type.

Seeing as this is all opaque, I'm not sure how to tell what is happening. I 
have moved my registration right to the start of application launching, in 
applicationWillFinishLaunching:, but it makes no difference. I know it's 
registered, because if I comment out the line that registers it, I can't save 
at all, so there is something in the migration where it is losing the 
information (I think).

I did discover the NSPersistentStoreTypeKey for my document in the info plist, 
and it was set to XML, so I tried changing it to the name of my store type 
(which also happens to be the classname), but that didn't change anything. I 
looked in the Info panel for that target, and it only showed Binary, Sqlite, 
XML and In Memory as the options in the UI, so I'm not sure what it should be 
set to for custom store types, and I didn't find anything in the documentation 
about it. I tried removing that key from the plist altogether but that made no 
difference, so I am assuming that my registration in code overrides whatever is 
set in the plist.

Anyone seen anything like this before, or have any suggestions as to where to 
look next, given the current error?

Sorry to be sending so many messages to the list, but this is a mission 
critical issue.

TIA for any suggestions.

Gideon

_______________________________________________

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