I'm working on a Cocoa-Touch app, it uses CoreData and has some NSPersistentObject subclasses generated by the XCode model editor.
I've noticed that recently, when saving the context I get an error which has as user info the following part:
(gdb) po ui {
"Dangling reference to an invalid object." = <null>;
NSAffectedObjectsErrorKey = <dump #1 of someObject>;
NSLocalizedDescription = "Operation could not be completed. (Cocoa error 1550.)";
NSValidationErrorKey = <someKey pointing to someObject #1>;
NSValidationErrorObject = <dump #2 of someOtherObject which points to the dump #1 object>;
NSValidationErrorValue = { <list of someMoreObjects> };
}
There are on other keys in the user info dictionary.
All the dumps I get are valid objects, I've verified them all.
NSValidationErrorObject is an object which has an NSSet which contains objects of types dumped in NSAffectedObjectsErrorKey and NSValidationErrorValue. But all these objects are valid.
Furthermore, this happens randomly, sometimes it happens, sometimes not, and sometimes the list dumped in NSValidationErrorValue is longer, sometimes shorter.
I have no clue why this is happening, or what exactly the error is. Does anyone know what's going on? Any ideas what might cause this bizarre error?