Object's persistent store is not reachable from this NSManagedObjectContext's coordinator

Viewed 593

I have the following crash log on iOS 12.0.1:

Object's persistent store is not reachable from this NSManagedObjectContext's coordinator
Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x1dae1bef8 __exceptionPreprocess
1  libobjc.A.dylib                0x1d9fe9a40 objc_exception_throw
2  CoreData                       0x1dda6f828 _PFRetainedObjectIDCore
3  CoreData                       0x1dd9a3238 -[NSManagedObjectContext objectWithID:]

How is this possible if I do not reset the persistent store?

1 Answers

Found your question and it is 100% similar to the crash I'm observing but have no idea how it might be fixed. The object is accessed from the main tread while it estimates the cells heights on the device rotation. I think that might be happening when the app is going to the background.

2 CoreData _PFRetainedObjectIDCore
3 CoreData -[NSManagedObjectContext objectWithID:]
4 CoreData _faultBatchAtIndex
5 CoreData -[_PFBatchFaultingArray retainedObjectAtIndex:]
6 CoreData -[_PFBatchFaultingArray objectAtIndex:]
7 CoreData -[NSFetchedResultsController objectAtIndexPath:]

9 UIKitCore -[UITableView _estimatedHeightForRowAtIndexPath:]
10 UIKitCore __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke
11 UIKitCore -[UISectionRowData refreshWithSection:tableView:tableViewRowData:]
12 UIKitCore -[UITableViewRowData numberOfRows]
13 UIKitCore -[UITableView noteNumberOfRowsChanged]
14 UIKitCore -[UITableView reloadData]
Related