我正面临一个奇怪的 CoreData 问题。这是日志:
2010-04-07 15:59:36.913 MyProject[263:207] <MyEntity: 0x180370> (entity: MyEntity; id: 0x17e890 <x-coredata://0F55C533-41BD-4F09-9CCA-0CB304CAB065/MyEntity/p380> ; data: <fault>)
2010-04-07 15:59:36.918 MyProject[263:207] *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'The NSManagedObject with ID:0x17e890 <x-coredata://0F55C533-41BD-4F09-9CCA-0CB304CAB065/MyEntity/p380> has been invalidated.'
I have a hierarchy of UITableViewControllers that use NSFetchedResultsController to populate the table, and when a particular row is selected, the detail view is shown.
UITableView (MyMainEntity)
UITableView (MyEntity)
UITableView (MyEntity) detail view
MyMainEntity UITableView 和 MyEntity UITableView 都使用 NSFetchedResultsController 来显示记录。有时它在我滚动 tableView 时崩溃,有时它在我尝试打开详细视图时崩溃。在应用程序崩溃之前,我可以多次导航到 MyEntity 详细信息视图。
这个错误是什么意思?我该如何解决它!?