Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

[ASTableNode] Deallocation while inside of a collection view may cause UIKit error. #896

@tomizimobile

Description

@tomizimobile

My setup: I have an ASCollectionView which contains an ASCellNode, which contains an ASTableNode. To set up the ASTableNode, i assign the asyncDataSource and asyncDelegate in -didLoad of the containing cell, since that's when I know the backing ASTableView is ready. Then I call setNeedsLayout() on the cell so it can lay out properly. The collection view is in a modally-presented view controller. The UI loads and lays out just fine - it's rough around the edges, but it's similar to the layout I'm using in my current project.

The issue is I get a crash in -[ASCollectionView dealloc] when dismissing the view controller. I've noticed that if I don't call setNeedsLayout() in -didLoad, the crash doesn't occur, but the cell isn't laid out properly. Is there a better way to set the ASTableNode asyncDataSource and asyncDelegate, or some other layout spec solution that gives me the layout I'm looking for?

I've created a test project that demonstrates this: https://github.com/tomizimobile/ASDK_CollectionCellNode-TableNode-crash. It occurs using the latest release, 1.9.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions