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

CollectionScreen crashes after reloading data #801

Open
nickyhajal opened this issue Jun 21, 2017 · 1 comment
Open

CollectionScreen crashes after reloading data #801

nickyhajal opened this issue Jun 21, 2017 · 1 comment

Comments

@nickyhajal
Copy link

I have a CollectionScreen that I'm using to display dates. If I change the dates on the collection and call reload_data, I get the following error:

'NSInternalInconsistencyException', reason: 'UICollectionView received layout attributes for a cell with an index path that does not exist: <NSIndexPath: 0xc000000000e00016> {length = 2, path = 0 - 7}'

The web is full of reports like the following:

http://villageblacksmith.consulting/uicollectionviewcontroller-crashes/

However, calling this.collectionViewLayout.invalidateLayout or this.collectionView.collectionViewLayout.invalidateLayout seems to have no effect.

The error is exactly the same no matter what data I update with (even an empty array).

I've been trying to resolve this for about 24 hours with no progress so I wanted to check in to see if anyone here has thoughts on how to get data reloading properly.

Thanks!

@jamonholmgren
Copy link
Owner

Hey @nickyhajal I seem to remember this happening to me, but it was several years ago, so I don't remember what project or how I solved it.

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

No branches or pull requests

2 participants