Code Monkey home page Code Monkey logo

Comments (2)

nolanw avatar nolanw commented on June 12, 2024

This looks like the same crash as ra1028/DiffableDataSources#28.

from ibpcollectionviewcompositionallayout.

nolanw avatar nolanw commented on June 12, 2024

I'm suspicious of IBPCollectionViewCompositionalLayout not returning attributes for orthogonally-scrolling section items from -layoutAttributesForElementsInRect: and -layoutAttributesForItemAtIndexPath:. The iOS 11 crash backtrace looks like this:

#0	0x0000000104fbd001 in objc_exception_throw ()
#1	0x00000001059680bc in _CFThrowFormattedException ()
#2	0x000000010583b72a in -[__NSDictionaryM setObject:forKey:] ()
#3	0x0000000106f87f07 in -[UICollectionView _setVisibleView:forLayoutAttributes:] ()
#4	0x0000000106fa0dcb in __71-[UICollectionView _updateWithItems:tentativelyForReordering:animator:]_block_invoke.1997 ()
#5	0x000000010657c537 in +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] ()
#6	0x000000010657ca0f in +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] ()
#7	0x0000000106fa00f5 in -[UICollectionView _updateWithItems:tentativelyForReordering:animator:] ()
#8	0x0000000106f99cc3 in -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:] ()
#9	0x0000000106f95554 in -[UICollectionView _updateRowsAtIndexPaths:updateAction:updates:] ()

and seems to happen when the collection view gets nil for an attributes's index path, then tries to use that nil index path as a key in a dictionary.

For what it's worth, UIKit's layout does return attributes instances for orthogonally-scrolling sections.

from ibpcollectionviewcompositionallayout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.