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

Ignore Relayout Requests for Deleted Cell Nodes #279

Merged
merged 3 commits into from
May 16, 2017
Merged

Conversation

Adlai-Holler
Copy link
Member

Resolves #277

As the data controller, it's fine to skip the layout. The cell node will either be deallocated, or it'll be hosted somewhere else and it'll get a new layout pass.

@nguyenhuy
Copy link
Member

Copy link
Member

@nguyenhuy nguyenhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One non-blocking question: Should we also do a sanity check inside -dataController:presentedSizeForElement:matchesSize: and bail early if index path of the given element is nil?

@jeffdav
Copy link

jeffdav commented May 16, 2017

Since I can't see the crash report, I assume that is a known crash this change fixes?

I'll try to test this fix today in my code.

@nguyenhuy
Copy link
Member

@jeffdav The stacktrace is very similar to yours. I believe they have the same root cause.

@Adlai-Holler Adlai-Holler merged commit 432018c into master May 16, 2017
@Adlai-Holler Adlai-Holler deleted the AHNilNodeCrash branch May 16, 2017 18:31
@jeffdav
Copy link

jeffdav commented May 16, 2017

Fix confirmed. Thank you.

bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
* Data Controller: Ignore relayout requests for elements that have been deleted in the mean-time.

* Bolster our logchange

* Add sanity check
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

Successfully merging this pull request may close these issues.

None yet

3 participants