3lvis / DATASource

Core Data's NSFetchedResultsController wrapper for UITableView and UICollectionView
Other
106 stars 27 forks source link

Invalid Update Crash #123

Open beekeweerts opened 3 years ago

beekeweerts commented 3 years ago

Hi @3lvis :) first of all: Thank you for this nice framework. Its pretty helpful, but I am facing one problem regarding the update of data.

The app is crashing inside: public func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) { while callingtableView.endUpdates() with this error: Invalid update: invalid number of rows in section 2. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).

Seems like a duplicate to this issue: https://github.com/3lvis/DATASource/issues/120 but this one is closed cause of a solution within Version 7.4.0. I am using 7.5.0 and still getting this error to 10% of all my users which is pretty bad. Could u have a look, please?

3lvis commented 3 years ago

Hi @beekeweerts,

Thanks for your words! There's an issue with CoreData that when it works it's great and when it doesn't it's terrible. I've been trying to fix what you are mentioning with no luck for the last 5 years, it always seems fixed and comes again.

Sorry for not being more helpful. My advise would be for you to skip CoreData and use something else.