我收到了一些客户的报告,但有例外:
'Illegal attempt to establish a relationship 'titleBox' between objects in different contexts
0 CoreFoundation 0x96a856ca __raiseError + 410
1 libobjc.A.dylib 0x921535a9 objc_exception_throw + 56
2 CoreFoundation 0x96ad0a21 -[NSException raise] + 17
3 ExceptionHandling 0x998d44c5 -[NSExceptionHandler _handleException:mask:] + 1877
4 ExceptionHandling 0x998d3d52 NSExceptionHandlerExceptionRaiser + 228
5 libobjc.A.dylib 0x921535a9 objc_exception_throw + 56
6 CoreData 0x92da3278 _PFManagedObject_coerceValueForKeyWithDescription + 1768
7 CoreData 0x92db9e8f _sharedIMPL_setvfk_core + 159
8 CoreData 0x92da2a56 -[NSManagedObject(_PFDynamicAccessorsAndPropertySupport) _setGenericValue:forKey:withIndex:flags:] + 54
9 CoreData 0x92dbd689 -[NSManagedObject(_NSInternalMethods) _maintainInverseRelationship:forProperty:oldDestination:newDestination:] + 505
10 CoreData 0x92dbd321 -[NSManagedObject(_NSInternalMethods) _didChangeValue:forRelationship:named:withInverse:] + 961
11 CoreData 0x92dbcf4b -[NSManagedObjectContext observeValueForKeyPath:ofObject:change:context:] + 187
12 Foundation 0x95d4502c NSKeyValueNotifyObserver + 372
13 Foundation 0x95d44acb NSKeyValueDidChange + 377
14 Foundation 0x95d292b6 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 127
15 CoreData 0x92dbce25 -[NSManagedObject didChangeValueForKey:] + 69
16 Sandvox 0x0006ecc6 -[KSExtensibleManagedObject didChangeValueForKey:] + 858
17 CoreData 0x92de9deb -[NSManagedObject(_NSInternalMethods) _updateFromToManyAwareSnapshot:forUndo:] + 683
18 CoreData 0x92de6540 -[NSManagedObject(_NSInternalMethods) _updateFromUndoSnapshot:] + 48
19 CoreData 0x92de5775 -[NSManagedObjectContext(_NSInternalChangeProcessing) _undoDeletions:] + 1093
20 Foundation 0x95eadb60 -[_NSUndoLightInvocation invoke] + 34
21 Foundation 0x95eadf60 -[_NSUndoStack popAndInvoke] + 265
22 Foundation 0x95eae2a0 -[NSUndoManager undoNestedGroup] + 342
到目前为止,我们还没有能够重现它。在我看来,Core Data正在尝试将一个已被“未删除”的对象与另一个尚未接受相同处理的对象连接起来。为什么Core Data会这样做呢?