IGListKit
IGListKit copied to clipboard
Nested collection view crash when removing?
New issue checklist
- [x] I have reviewed the
READMEand documentation - [x] I have searched existing issues and this is not a duplicate
- [ ] I have attempted to reproduce the issue and include an example project.
General information
IGListKitversion: master- iOS version(s): 13.1.2
- Xcode version: 11
I have a nested collection view using IGListKit. So the parent collection view has a few of its own cells and then one section (cell) that contains the child collection view.
I have it set up such that when the parent collection view encounters a loading error of some sort, it returns an empty objects ([]). But during loading the child collection view is already present (with some loading animations, etc.)
However, when I update the objects function to return [] in parent, I get the following crash:
request for number of items in section 9223372036854775807 when there are only 0 sections in the collection view
This only occurs when the child collection view is no longer in the view hierarchy (or the data hierarchy).
I'm not sure how IGListKit handles diffing or updating under the hood, and I also don't know where something like 9223372036854775807 can come up.. If I keep the child collection view around, everything works just fine. Is there any extra step I am missing when updating the parent collection view?
Thanks!
@danqing Would you be able to provide a sample project which reproduces the issue? If you could provide a link to a project, I can take a look.
I had the same issue in Xcode 11.4 on iOS 13. The interesting thing is 9223372036854775807 is 0x7FFFFFFFFFFFFFFF, the biggest int for 64bit
@danqing @danleechina Have you ever found a solution to this problem? We're getting this crash on iOS 17.x and can reproduce by reloading / removing views.