• 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
re:Persistent store removal throwing invalidated NSManagedObject exceptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re:Persistent store removal throwing invalidated NSManagedObject exceptions


  • Subject: re:Persistent store removal throwing invalidated NSManagedObject exceptions
  • From: Ben Trumbull <email@hidden>
  • Date: Wed, 1 Apr 2009 13:07:39 -0700

I've setup a temporary managed object context to export data to an
external XML file (persistent store). When I remove the persistent
store from the context, I am getting errors like this:

Exception raised during posting of notification.  Ignored.  exception:
'The NSManagedObject with ID:0x18656990 <x-coredata://2E9A390F-BA42-48E7-847A-EAB4E11CCCF1/CollectionGroup/p104
has been invalidated.' invoked observer method: '*** -
[NSManagedObjectContext _storeConfigurationChanged:]'  observer:
0x1864d370  notification name:
'_NSPersistentStoreCoordinatorStoresDidChangePrivateNotification'

When you remove a store from the coordinator, all the live managed objects from that store are invalidated. Their backing store is gone, so they are pretty useless, and we cannot fulfill any requests to materialize faults without the store.


So what you see here is a KVO observer trying to fire a fault after you've removed the store and the fault is severed from the backing persistence mechanism.

You should remove all your KVO observers before removing the store.

- Ben



_______________________________________________

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: Re: Persistent store removal throwing invalidated NSManagedObject exceptions
  • Next by Date: Re: Best Strategy to Control iTunes
  • Previous by thread: Re: NS <-> CG Rect Conversion and screen coordinates
  • Next by thread: How to synchronize two managedObjectContexts...
  • Index(es):
    • Date
    • Thread