You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Mihai Chira <mi...@gmail.com> on 2017/06/07 11:25:58 UTC

Fwd: [jira] [Commented] (FLEX-35321) LayoutManager initializes components which are no longer on stage

---------- Forwarded message ----------
From: Mihai Chira (JIRA) <ji...@apache.org>
Date: 7 June 2017 at 13:25
Subject: [jira] [Commented] (FLEX-35321) LayoutManager initializes
components which are no longer on stage
To: issues@flex.apache.org



    [ https://issues.apache.org/jira/browse/FLEX-35321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040726#comment-16040726
]

Mihai Chira commented on FLEX-35321:
------------------------------------

Thank you for your thoughts, Alex. Indeed, it would be quite
complicated to remove component trees from the
{{updateCompleteQueue}}. But actually the bug (seems to me that it) is
fixable in a simpler way: just checking for a {{nestLevel}} different
from 0 before setting the component's {{initialized}} flag to
{{true}}. The bug's unit test passes with these changes, and I've just
done a smoke test of our (large) application with these
{{LayoutManager}} changes. Please see the patch that I've attached and
let me know if you anticipate any problems. In the meantime I'll add a
couple more unit test functions for some scenarios issues that I can
anticipate. Thanks!

> LayoutManager initializes components which are no longer on stage
> -----------------------------------------------------------------
>
>                 Key: FLEX-35321
>                 URL: https://issues.apache.org/jira/browse/FLEX-35321
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Layout - General
>    Affects Versions: Apache Flex 4.16.0
>            Reporter: Mihai Chira
>            Assignee: Mihai Chira
>             Fix For: Apache Flex 4.17.0
>
>         Attachments: FLEX-35321 potential solution.patch
>
>
> *Scenario A*: during an object's validation cycle some code resulting from {{validateSize()}}, {{validateProperties()}} or {{validateDisplayList()}} results in the object's removal from stage.
> *Scenario B*: a user performs an action whose effect is the removal of a component, exactly when that component is being validated in phases ({{LayoutManager.usePhasedInstantiation == true}}, which is to say, in the span of two-three frames.
> (For the unit test that models this scenario.)
> ----
> *Expected behaviour*: {{LayoutManager}} detects the object's removal from stage, stops validating it, and never sets its {{initialized}} flag to {{true}}.
> *Actual behaviour*: {{LayoutManager}} does not detect the object's removal from stage, continues validating it, and ends up setting the object's {{initialized}} flag to {{true}}.
> *Unit test*: {{LayoutManager_FLEX_35321_Tests}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)