This is a long shot, since a google search returns absolutely nothing on this. Sometimes, often enough where it merits further investigation but not often enough where I can track down when or how exactly it happens, I get the following exception when I call save: on a NSManagedObjectContext:
-[_NSObjectID_48_0 _stateFlags]: unrecognized selector sent to instance 0x8675570
The context is a child context with type NSPrivateQueueConcurrencyType, which is a child of the main context with type NSMainQueueConcurrencyType.
I really don’t have any further information other than the stack trace:

Can any cryptographers make anything out of the stack trace to conjure up some possible ideas as to what the problem could be?
The log message indicates that for some reason we are looking for the property/method
_stateFlagson_NSObjectID_48_0, one of which is a private API, and the other is a private class.A quick run of
class-dump /System/Library/Frameworks/CoreData.framework/Versions/A/CoreDataseems to indicate that (among other places)
_stateFlagsis a private API onNSManagedObject. I can’t find any reference to a private class named_NSObjectID_48_0on my Mac, but based on name alone it seems related toNSManagedObjectID.This is a long shot, but I am wondering if you have at some point passed an
NSManagedObjectIDwhere anNSManagedObjectwas expected instead? It can’t hurt to grep your code for explicit coercions toNSManagedObject.Another culprit might be inserting NSManagedObjectIDs into a weakly-typed datastructure (dictionaries/arrays/sets I’m looking at you) which might allow you to “coerce” to NSManagedObject without being explicit about it.