JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means waiting times in the issue tracker are very long and mostly depend on community. Sorry for the inconvenience.

List of issuesList of issues

#1009 Wrong AS3 output in case of looping through ArrayCollection with 'for each' and 'for' with direct-index-access
Author: user devbn
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: closed Help

> What steps will reproduce the problem? Decompile test.swf file attached together with this issue. > What is the expected output? What do you see instead? EXPECTED: The method 'application1_creationCompleteHandler' in class 'test' must be something like this: var a:ArrayCollection = new ArrayCollection(["first","second"]); for each(var o:String in a) { trace(o); } for(var i:* = 0; i < a.length; i++) { o = a[i]; trace(o); } ACTUAL: var o:String = null; var i:* = 0; var a:ArrayCollection = new ArrayCollection(["first","second"]); for(for each(o in a) { trace(o); }; i < a.length; ) { o = a[i]; trace(o); i++; } > What version of the product are you using? Is it "nightly build"? Which operating system do you have? Using JPEXs FFdec version 6.0.1 > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. See attached files
Downloadtest.mxml (1 KiB)Downloadtest.swf (614 KiB)
user
P.S: I mean the expectation is that the decompiled source must have two separate FOR loop, but the actual only contains one loop followed by one ERROR loop statement WITHOUT 'for' keyword
developer
There are 2 for keywords: for(for each(o in a) the first loop is inside your first parameter of your 2nd for loop, so this code is equivalent. (if it is allowed in AS, i don't know) So you can find the "for" keyword for the 2nd loop before your first loop:) But true, this is not so nice. (Even if it works)
user
This code causes compile error in FlashBuilder: Description Resource Path Location Type 1008: Attribute is invalid. test.as /te/src line 20 Flex Problem 1084: Syntax error: expecting colon before leftparen. test.as /te/src line 18 Flex Problem 1084: Syntax error: expecting identifier before for. test.as /te/src line 16 Flex Problem 1084: Syntax error: expecting identifier before rightbrace. test.as /te/src line 19 Flex Problem 1084: Syntax error: expecting identifier before rightparen. test.as /te/src line 19 Flex Problem 1084: Syntax error: expecting rightparen before semicolon. test.as /te/src line 19 Flex Problem 1084: Syntax error: expecting semicolon before leftbrace. test.as /te/src line 17 Flex Problem
admin
Looks like this is already fixed in 6.1.0, it was problem with for loop /debugline detection.
State: new→upgraded
user
Thank you!
developer
I close this issue due to inactivity. Please create new issue if problem still exists.
State: upgraded→closed