JPEXS Free Flash Decompiler Issue Tracker

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

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#1060 Wrong and / or when compiled as push false / push true
Author: user Brandon
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS3Decompilation
State: closed Help

im using 6.0.2 nightly build 950. i chekced all previous 6.0. problem exists in each build > What steps will reproduce the problem? open attached file and check for any conditions (if, while) that has multiple operands for example look into match.base.MatchLevel.as public function updateAlternativeMatchGroup() : void { var _loc4_:* = null as MatchGroup; var _loc1_:MatchGroup = null; var _loc2_:int = 0; var _loc3_:Array = _matchGroups; while(_loc2_ < _loc3_.length) { _loc4_ = _loc3_[_loc2_]; _loc2_++; if(_loc1_ == null && _loc1_.id <= _loc4_.id || _loc4_.totalRatio > 0) { ... It is clear that if(_loc1_ == null && _loc1_.id <= _loc4_.id || _loc4_.totalRatio > 0) should look like if(_loc1_ == null || _loc1_.id <= _loc4_.id && _loc4_.totalRatio > 0) Next is match.amy.AmyLevel.as (line 238) else if(_loc15_.type != "objectgroup" || _loc15_.name == "decor1") should look like else if(_loc15_.type == "objectgroup" && _loc15_.name == "decor1") Next is match.amy.AmyLevel.as (line 286) if(_loc24_.gid < 181 || _loc24_.gid <= 195) should look like if(_loc24_.gid >= 181 && _loc24_.gid <= 195) Next is match.amy.AmyLevel.as (line 521) if(_loc35_ == null || _loc35_.getTile() != null) should look like if(_loc35_ != null && _loc35_.getTile() != null) > What is the expected output? What do you see instead? > What version of the product are you using? Is it "nightly build"? Which operating system do you have? > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you.
user
So. Is this bug ? Or some kind of tricky obfuscation ?
developer
I think this is a bug
user
Also i noticed, that there are no definition for static variables. public class SomeClass { public static var a:Array = new Array(); ... } will be decompiled as public class SomeClass { public static var a:Array; ... }
user
for example see match.amy.MatchRule2 or is it'll be better to make separate ticket ?
user
match.amy.MatchRule2 (line 15) public static var directions:Array; should be something like public static var directions:Array = new Array([0,1],[1,0]....)
developer
I think until they are in the same swf, and each problem is an incorrect decompilation, you can write all of them here, but JPEXS will correct me if he has another opinion.
user
Is there something i could do to help? ifs and whiles are not so bad, because the could be reverted to its original form. but static variables are big data losses. no way to recover it :( Anyway i want to Thank You for such product. None of existing decompilers could ever achive such amazingly close results!
developer
FFDec is opensource, you can try to fix the problem, and send a pull request with the fix:)
user
Wooh it would be the longest fix history of development ever seen. Since i have to lear java first :)
developer
It is not really about Java, it is about an algorithm... It is almost the same in every language:)
admin
Please create separate issue for those static variables. These are initialized in script initializer and we need to handle script initializer correctly. I will solve the && + || problem here. Thanks.
Title: Incorrect decompilation →Wrong and / or conditions
user
Since nither i dont know decompilation algorithms nor java. Hope my donation will help you some how :-)
user
JPEXS, issue about static variables is created. Thank's in advance.
admin
Hi, thanks for the donation, but I don't like the idea that the donation will speed up our work on it. It needs to be fixed no matter of any donations. If you donated only because of this incomplete issue, then please rather take it back, because it makes me sad this way. The decompiler is free and always will be free, we do not accept any money to do something. I will surely take a look what's wrong there and fix it, but it will take some time and our time is limited. We have our regular jobs. Receiving money for it don't give us more time to do it....
user
JPEXS didnt want to speed you up. just wanted to help. and this is the only way i could do it.
admin
okay, thanks :-)
user
no problem :-)
admin
Should be fixed in nightly 958 or later
State: new→upgraded
Title: Wrong and / or conditions→Wrong and / or when compiled as push false / push true
admin
In 962, I fixed it once more, this time for real I guess :-)
user
Seems like it is ok. Thank you, JPEXS! I say about people, when i see what they do. You have an excellent hobby, a sharp mind and amazing tallent.
developer
State: upgraded→closed