Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

IOS16: NSInternalInconsistencyException: UICollectionViewLayoutAttributes: -setSize: requires finite dimensions #243

@dreampowder

Description

@dreampowder

Hello, first of all, thanks a lot for this wonderful library.

From time to time, i see a random crash log in crashlytics, which i couldn't reproduce on my side whatever i do.

Fatal Exception: NSInternalInconsistencyException
UICollectionViewLayoutAttributes: -setSize: requires finite dimensions <UICollectionViewLayoutAttributes: 0x14b2c0140> index path: (1-0); element kind: (groupBackground); frame = (0 377.667; 390 294.333); alpha = 0; - {inf, inf}

the groupBackground is registered like this:

    var collectionViewLayouts:ASCollectionLayout<SeasonScreenSections>{
        let layout =  ASCollectionLayout<SeasonScreenSections>(scrollDirection: .vertical, interSectionSpacing: 0.0,layoutPerSection: {sectionId in
            switch(sectionId){
            case .beatpacks:
                return SeasonLayoutGenerator.beatpackLayout(columnCount: 2)
            case .spotlight:
                return SeasonLayoutGenerator.beatpackLayout(columnCount: 1)
            case .creators:
                return SeasonLayoutGenerator.creatorLayout()
            case .season_header:
                return SeasonLayoutGenerator.seasonHeaderLayout(height: seasonImgHeight ?? 0)
            }
        }).decorationView(GroupBackground.self, forDecorationViewOfKind: "groupBackground")
        return layout
    }

and GroupBackground is like this:

struct GroupBackground: View, Decoration
{
    var body: some View
    {
        Color.gray
    }
}

Thanks a lot for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions