You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NSInvalidArgumentException: no object at index 6 in section at index 0
File "PostListViewController.swift", line 160, in PostListViewController.postAtIndexPath
File "PostListViewController.swift", line 225, in PostListViewController.tableView
File "<compiler-generated>", in thunk for closure
File "main.swift", line 7, in main
...
(26 additional frame(s) were not displayed)
The text was updated successfully, but these errors were encountered:
guard let post = fetchResultsController.object(at: indexPath)as?Postelse{
fatalError("Expected a post object.")
}
Particularly from the object(at:) method of NSFetchedResultsController, as per the documentation:
If indexPath does not describe a valid index path in the fetch results, an exception is raised.
I wonder if there's a safer way to escape this exception and use wpAssertionFailure instead... This looks like a race between the data refreshing and the table view reloading its cells while still referring to the previous set of index paths.
Sentry Issue: WORDPRESS-IOS-46F4
The text was updated successfully, but these errors were encountered: