Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3BF23200B50 for ; Sat, 13 Aug 2016 16:50:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3A61B160AA6; Sat, 13 Aug 2016 14:50:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8031C160A73 for ; Sat, 13 Aug 2016 16:50:23 +0200 (CEST) Received: (qmail 83565 invoked by uid 500); 13 Aug 2016 14:50:20 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 83523 invoked by uid 99); 13 Aug 2016 14:50:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Aug 2016 14:50:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 92DA02C02A3 for ; Sat, 13 Aug 2016 14:50:20 +0000 (UTC) Date: Sat, 13 Aug 2016 14:50:20 +0000 (UTC) From: "Mihai Chira (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-33311) Nullpointer in ConstraintLayout when executing Transition on DropDownList MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 13 Aug 2016 14:50:24 -0000 [ https://issues.apache.org/jira/browse/FLEX-33311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Chira updated FLEX-33311: ------------------------------- Description: In some very specific cases {{ConstraintLayout}} will throw a null pointer error when a component inside it is playing a transition. I tried a few things and found out that: * {{parseConstraints()}} creates a new {{rowBaselines}} Vector (or empties it if it exists) * some other process calls {{clearConstraintCache()}} in the middle of the execution of {{parseConstraints()}}, setting {{rowBaselines}} back to {{null}} * {{parseConstraints()}} calls {{parseElementConstraints()}} which tries to access elements in {{rowBaselines}} and throws the error I know very little about how Effects and Transitions work, so the "some other process" part is a bit of a mistery to me. *Steps to reproduce*: # Compile and run Main.mxml # Select the first item in the list # Click on the list and, before the resize transition finishes, click on it again. *Workaround*: subclass ConstraintLayout (or FormItemLayout), override `measure()`, put a try/cacth block around it and use this custom layout. Not exactly pretty but it works without apparent side effects. *Quick fix* (but probably not the ideal solution): just test whether {{rowBaselines}} exists before trying to access it in {{ConstraintLayout.parseElementConstraints()}}. was: In some very specific cases `ConstraintLayout` will throw a nullpointer error when a component inside it is playing a transition. I tried a few things and found out that: - `parseConstraints()` creates a new `rowBaselines` Vector (or empties it if it exists) - some other process calls `clearConstraintCache()` in the middle of the execution of `parseConstraints()`, setting `rowBaselines` back to `null` - `parseConstraints()` calls `parseElementConstraints()` which tries to access elements in `rowBaselines` and throws a nullpointer error I know very little about how Effects and Transitions work, so the "some other process" part is a bit of a mistery to me. *Steps to reproduce*: # Compile and run Main.mxml # Select the first item in the list # Click on the list and, before the resize transition finishes, click on it again. *Workaround*: subclass ConstraintLayout (or FormItemLayout), override `measure()`, put a try/cacth block around it and use this custom layout. Not exactly pretty but it works without apparent side effects. *Quick fix* (but probably not the ideal solution): just test whether {{rowBaselines}} exists before trying to access it in {{ConstraintLayout.parseElementConstraints()}}. > Nullpointer in ConstraintLayout when executing Transition on DropDownList > ------------------------------------------------------------------------- > > Key: FLEX-33311 > URL: https://issues.apache.org/jira/browse/FLEX-33311 > Project: Apache Flex > Issue Type: Bug > Components: Spark: Layout, Transitions > Affects Versions: Apache Flex 4.8 (parity release) > Reporter: Maxime Cowez > Assignee: Mihai Chira > Fix For: Apache Flex 4.9.0 > > Attachments: Main.mxml, SpecifiableListWrapper.as, SpecifiableListWrapperHorizontalSkin.mxml > > > In some very specific cases {{ConstraintLayout}} will throw a null pointer error when a component inside it is playing a transition. I tried a few things and found out that: > * {{parseConstraints()}} creates a new {{rowBaselines}} Vector (or empties it if it exists) > * some other process calls {{clearConstraintCache()}} in the middle of the execution of {{parseConstraints()}}, setting {{rowBaselines}} back to {{null}} > * {{parseConstraints()}} calls {{parseElementConstraints()}} which tries to access elements in {{rowBaselines}} and throws the error > I know very little about how Effects and Transitions work, so the "some other process" part is a bit of a mistery to me. > *Steps to reproduce*: > # Compile and run Main.mxml > # Select the first item in the list > # Click on the list and, before the resize transition finishes, click on it again. > *Workaround*: subclass ConstraintLayout (or FormItemLayout), override `measure()`, put a try/cacth block around it and use this custom layout. Not exactly pretty but it works without apparent side effects. > *Quick fix* (but probably not the ideal solution): just test whether {{rowBaselines}} exists before trying to access it in {{ConstraintLayout.parseElementConstraints()}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)