2
votes

I'm using a UITableView to display some settings to the user. When reloading a section or inserting some rows with animation, it is possible to make a mistake in the the delegate/datasource functions causing an

Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-3232.3/UITableView.m:1560

This has happened to me many times, but usually it also states what I did wrong, like so:

Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-2380.17/UITableView.m:1070

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.

As of late, the reason is not displayed in the console anymore, just the assertion failure and a SIGABRT line.

This is very annoying and makes debugging very time consuming. Any clue what I can do to restore this feature?

1

1 Answers

3
votes

After posting my question and re-reading it, I realised that the portion of the message I was missing was the part of the uncaught exception

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.

I then realised I am using the PLCrashReporter since a month or two to report uncaught exceptions to our server. Disabling the crashreporter restored the reason bit of the message in the console.

doh!