Reproducible UITableView corruption when loading from Core Data.

Originator:gotte
Number:rdar://19797531 Date Originated:11-Feb-2015 12:34 PM
Status:Open Resolved:
Product:iOS SDK Product Version:8.1, 8.0, 7.0
Classification:Serious Bug Reproducible:Always
 
Summary:
A Core Data bug when using background contexts in conjunction with NSFetchedResultsController. The error occurs when simultaneously performing insertions and deletions as part of a single background context save will call the fetched results controller delegates multiple times. The first call to the delegate method ONLY handles the insertion. The second call tries to handle the insertion and the deletion with a layout in-between, causing all kinds of unpredictable issues including an Assertion failure.

Steps to Reproduce:
We are attaching a sample project with which to reproduce the steps:
1) Add multiple rows using “+” button (add more than five).
2) Add and Remove a row simultaneously by pressing the “+/-1” button in the lower left corner.

Expected Results:
You would expect a row to be inserted and a row to be deleted.

Actual Results:
You get an Assertion failure and only the insertion occurs.

Regression:
This is reproducible in iOS7 and 8 and on all hardware tested including iPhone 6, 6 Plus, 5, and 5S.

This is a duplicate of rdar://19797495

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!