Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23B62DFB0 for ; Wed, 28 Nov 2012 02:55:02 +0000 (UTC) Received: (qmail 13911 invoked by uid 500); 28 Nov 2012 02:55:01 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 13250 invoked by uid 500); 28 Nov 2012 02:55:00 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 13138 invoked by uid 99); 28 Nov 2012 02:54:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 02:54:59 +0000 Date: Wed, 28 Nov 2012 02:54:59 +0000 (UTC) From: "Ben Crowl (JIRA)" To: flex-dev@incubator.apache.org Message-ID: <1234035598.30969.1354071299563.JavaMail.jiratomcat@arcas> In-Reply-To: <656455877.30770.1354066618850.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (FLEX-33280) [iOS] Packager compiles boolean condition incorrectly after loop break MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-33280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ben Crowl updated FLEX-33280: ----------------------------- Description: ActionScript codes executes unexpectedly when compiled with Ad-Hoc packaging type, using the Flex Packager for iOS. The attached sample program contains a for each loop within another for each loop, that is used to compare two lists of integers. At the start of the outer loop, a variable named "matched" is set to false. When a match is found in the inner loop, matched is assigned the value true, and the inner loop issues a break command to early-exit the loop. Following the inner loop, an if statement checks the value of the boolean variable, like so: if (matched == false) { ... } When the code is execute as an adhoc iOS release build on an iPad 3, the code within the if statement is executed even when matched == true. Changing the code to the following, works as expected: if (!matched) { ... } Steps to reproduce: 1) Run the attached BasicMobile project in the AIR simulator on your desktop 2) The expected result is: 1. Using matched == false --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 Loop MATCHED: 3, 3 Loop UNMATCHED: 4 2. Using !matched --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 Loop MATCHED: 3, 3 Loop UNMATCHED: 4 3. Using no break --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 Loop MATCHED: 3, 3 Loop UNMATCHED: 4 3) Now export a release build for the same project to Apple iOS, using Ad Hoc packaging type. 4) Install the app on an iPad or iPhone 5) Run the app. The result is: 1. Using matched == false --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 UNMATCHED: 2 Loop MATCHED: 3, 3 UNMATCHED: 3 Loop UNMATCHED: 4 2. Using !matched --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 Loop MATCHED: 3, 3 Loop UNMATCHED: 4 3. Using !matched --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 Loop MATCHED: 3, 3 Loop UNMATCHED: 4 Notice how in the Adhoc release version, the first case "1. Using matched == false" reports MATCHED and UNMATCHED for items 2 and 3. This indicates that the boolean variable "matched" is passing the test == false, even when its value has been set to true. was: ActionScript codes executes unexpectedly when compiled with Ad-Hoc packaging type, using the Flex Packager for iOS. The attached sample program contains a for each loop within another for each loop, that is used to compare two lists of integers. At the start of the outer loop, a variable named "matched" is set to false. When a match is found in the inner loop, matched is assigned the value true, and the inner loop issues a break command to early-exit the loop. Following the inner loop, an if statement checks the value of the boolean variable, like so: if (matched == false) { ... } When the code is execute as an adhoc iOS release build on an iPad 3, the code within the if statement is executed even when matched == true. Changing the code to the following, works as expected: if (!matched) { ... } Steps to reproduce: 1) Run the attached BasicMobile project in the AIR simulator on your desktop 2) The expected result is: 1. Using matched == false --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 Loop MATCHED: 3, 3 Loop UNMATCHED: 4 2. Using !matched --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 Loop MATCHED: 3, 3 Loop UNMATCHED: 4 3. Using no break --------------------------- Loop UNMATCHED: 0 Loop UNMATCHED: 1 Loop MATCHED: 2, 2 Loop MATCHED: 3, 3 Loop UNMATCHED: 4 1) Export a release build for the attached BasicMobile project for Apple iOS, using Ad Hoc packaging type. 2) Install the app on an iPad or iPhone 3) Run the app. The expected result is: > [iOS] Packager compiles boolean condition incorrectly after loop break > ---------------------------------------------------------------------- > > Key: FLEX-33280 > URL: https://issues.apache.org/jira/browse/FLEX-33280 > Project: Apache Flex > Issue Type: Bug > Components: .Unspecified - Compiler, Installation & Packaging > Affects Versions: Adobe Flex SDK 4.6 (Release) > Environment: Windows 7 Ultimate > Adobe Flex SDK 4.6 (build 23201, includes Adobe AIR 3.4 SDK) > Flash Builder 4.5.1.313231 > iPad 3 (running iOS6.0) / iPad 2 (running iOS6.0) > Reporter: Ben Crowl > Labels: ios, packaging > Attachments: BasicMobile.zip > > > ActionScript codes executes unexpectedly when compiled with Ad-Hoc packaging type, using the Flex Packager for iOS. > The attached sample program contains a for each loop within another for each loop, that is used to compare two lists of integers. At the start of the outer loop, a variable named "matched" is set to false. > When a match is found in the inner loop, matched is assigned the value true, and the inner loop issues a break command to early-exit the loop. > Following the inner loop, an if statement checks the value of the boolean variable, like so: > if (matched == false) > { > ... > } > When the code is execute as an adhoc iOS release build on an iPad 3, the code within the if statement is executed even when matched == true. > Changing the code to the following, works as expected: > if (!matched) > { > ... > } > Steps to reproduce: > 1) Run the attached BasicMobile project in the AIR simulator on your desktop > 2) The expected result is: > 1. Using matched == false > --------------------------- > Loop > UNMATCHED: 0 > Loop > UNMATCHED: 1 > Loop > MATCHED: 2, 2 > Loop > MATCHED: 3, 3 > Loop > UNMATCHED: 4 > 2. Using !matched > --------------------------- > Loop > UNMATCHED: 0 > Loop > UNMATCHED: 1 > Loop > MATCHED: 2, 2 > Loop > MATCHED: 3, 3 > Loop > UNMATCHED: 4 > 3. Using no break > --------------------------- > Loop > UNMATCHED: 0 > Loop > UNMATCHED: 1 > Loop > MATCHED: 2, 2 > Loop > MATCHED: 3, 3 > Loop > UNMATCHED: 4 > 3) Now export a release build for the same project to Apple iOS, using Ad Hoc packaging type. > 4) Install the app on an iPad or iPhone > 5) Run the app. The result is: > 1. Using matched == false > --------------------------- > Loop > UNMATCHED: 0 > Loop > UNMATCHED: 1 > Loop > MATCHED: 2, 2 > UNMATCHED: 2 > Loop > MATCHED: 3, 3 > UNMATCHED: 3 > Loop > UNMATCHED: 4 > 2. Using !matched > --------------------------- > Loop > UNMATCHED: 0 > Loop > UNMATCHED: 1 > Loop > MATCHED: 2, 2 > Loop > MATCHED: 3, 3 > Loop > UNMATCHED: 4 > 3. Using !matched > --------------------------- > Loop > UNMATCHED: 0 > Loop > UNMATCHED: 1 > Loop > MATCHED: 2, 2 > Loop > MATCHED: 3, 3 > Loop > UNMATCHED: 4 > Notice how in the Adhoc release version, the first case "1. Using matched == false" reports MATCHED and UNMATCHED for items 2 and 3. This indicates that the boolean variable "matched" is passing the test == false, even when its value has been set to true. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira