Skip to content

When a dirty node is not in the tree, we should not clear the dirty bit. #5588

Closed

Description

@Hixie

Suppose you have two widgets that use global keys, let's call the A and B.

Suppose further that the first time you build the tree, B is a descendant of A.

Not suppose that at some point, the tree is rejiggered such that the following happens:

  1. A, and its descendants including B, are removed from the tree.
  2. A, and its descendants including B, are readded to the tree. This marks A and B dirty.
  3. When A is built, it removes B from the tree, because it now has different children.
  4. B is then processed as well, but it's not in the tree so it's dirty bit is cleared.
  5. Finally, some other node deeper than either A or B puts B back in the tree.

At this point, B will be marked dirty, however, it is already in the dirty list, and this will fire an assertion.

Activity

  1. Hixie commented on Aug 25, 2016

    @Hixie
    ContributorAuthor

    (I have a fix for this, just need to clean up my test.)

  2. self-assigned this
    on Aug 25, 2016
  3. github-actions commented on Sep 6, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions