• 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
How to debug Core Data save-as failure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to debug Core Data save-as failure


  • Subject: How to debug Core Data save-as failure
  • From: Quincey Morris <email@hidden>
  • Date: Sat, 2 Aug 2008 13:06:47 -0700

Anyone got any suggestions about how to debug the following situation?

I have a Core Data document application where saving the document works fine. But if I try to do a Save As instead (even a Save As immediately after opening or saving the document) Core Data throws an exception:

#0 0x912cc0d7 in objc_exception_throw
#1 0x971e5ed1 in -[NSPersistentStoreCoordinator(_NSInternalMethods) _retainedAllMigratedObjectsInStore:toStore:]
#2 0x971e4fe0 in -[NSPersistentStoreCoordinator migratePersistentStore:toURL:options:withType:error:]
#3 0x94eb4b1a in -[NSPersistentDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:]
#4 0x94caab15 in -[NSDocument _writeSafelyToURL:ofType:forSaveOperation:error:]
#5 0x94caa9d6 in -[NSDocument writeSafelyToURL:ofType:forSaveOperation:error:]
#6 0x94eb5111 in -[NSPersistentDocument writeSafelyToURL:ofType:forSaveOperation:error:]
...


The subsequent logged error message is:

The temporary directory at "/private/var/folders/[redacted]/ TemporaryItems/(A Document Being Saved By MyApp)" could not be deleted.

FWIW, if I continue after the exception, I get an error alert on the document window saying there were multiple validation failures. The properties it's complaining about (at least, the few I display) are all relationships to or from an abstract parent entity in the managed object model. I don't know if these errors are meaningful after the exception or not, but it makes me wonder if Save As doesn't work when entity inheritance is used in the data model (in the same way that model version migration doesn't work properly with inherited entities, I believe).



_______________________________________________

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


  • Prev by Date: Launch Path Not Accessible
  • Next by Date: Re: Non-editable TableView and the Evil NSEditorBinder
  • Previous by thread: Re: Launch Path Not Accessible
  • Next by thread: NSImage size vs. representations' sizes
  • Index(es):
    • Date
    • Thread