RxDataSources icon indicating copy to clipboard operation
RxDataSources copied to clipboard

Reloading tableview with RxTableViewSectionedAnimatedDataSource causes crashes

Open cristoppotelli opened this issue 6 years ago • 0 comments

Good Afternoon,

I adopted RxTableViewSectionedAnimatedDataSource for my table views, and most of the time works pretty well.

However, I'm experiencing crashes while reloading the table view from scratch, which triggers the precondition in TableViewSectionedDataSource's tableView(:cellForRowAt:) method.

After investigating more about the circumstances of the crash, I was able to understand at least what was causing it.

It seems that, if an interaction is stil occurring on the table view, while it is being updated (in my case, appended rows), it fails to update the table view, despite the dataSource holds the data that should have been added.

This inconsistency between the number of items in the dataSource, and the actual data in the table view, causes the crash when trying to reload it back.

cristoppotelli avatar May 20 '19 15:05 cristoppotelli