Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix internal inconsistency exceptions caused by cell updates #2195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rph8
Copy link

@rph8 rph8 commented Dec 19, 2021

Regarding the issue #2189 I opened previously, here is a proposed fix.

The current problem seems to be that some updates of the cell from within .cellUpdate can cause an internal inconsistency exception:
'NSInternalInconsistencyException', reason: 'UITableView internal inconsistency: _visibleRows and _visibleCells must be of same length. This can cause a crash of the app.

The fix proposed here eliminates this exception by moving the cellUpdate call out from the current call stack back into the next main loop run.

Tested with iOS 15.2 and Xcode 13.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant