JPEXS Free Flash Decompiler Issue Tracker

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

NEW : You can now close your own issues and reopen them later if needed. You can also comment closed issues.
List of issuesList of issues

#2636 Many things wrong in decompilation of a manually p-coded class
Author:
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: closed Help

> What steps will reproduce the problem? Open the Utility class in the attached file. > What is the expected output? What do you see instead? There are a lot of errors and weird code generation even though the class decompiled without too many issues in older versions such as 24.0.1. Also note weird switch statement case on line 919. > What version of the product are you using? Is it "nightly build"? Which operating system do you have? I'm using stable version 25.0.0 on Windows 10. > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. The class was made by manually editing the p-code, so it likely doesn't match what most compilers would provide, so being able to decompile it perfectly probably isn't too important; I do hope that this helps to catch bugs that might affect other places as well, though.
Downloadsnap48.swf (6,267 KiB)
This is fixed in FFDec 25.1.0
State: new→upgraded
I also experimented with the option how to handle the properties like this: arr.§1§ = 5; Which should be something like arr[1]. But the 1 is encoded unusually as QName. In the new version, you can enable using brackets for such QNames - enable it in Advanced settings / Scripts / Show AS3 obfuscated QName properties in brackets. It is off by default since it may cause problems for Ctrl+click in obfuscated files.
Thanks for the fixes! However, when opening the class with version 25.1.0 or nightly 3422, there still seem to be some issues, namely: - in the "compile" function, I still see some while(true) loops which probably shouldn't be there; - on line 378, there seems to be an incorrect switch statement; - there's still a weird case statement on line 883
Please try nightly 3423, it should be fixed. For the case statement on line 883 (now on 869), namely: switch(val1) { case 0: val1 = vars; break; case 1: val1 = localVars; } I think this one is decompiled correctly as there is lookupswitch P-code instruction used and that one is usually used for switches. It has only 2 branches and can be rewritten to if, but I think I should generally translate the lookupswitch as switch, not if. Let me know it it's okay now, I will release 25.1.1 then.
Thank you, on nightly 3424 it's now almost perfect, but there are still a couple issues left: - The code inside the while(true) loop in the compileSnailText function seems to be incorrect, FFDec currently shows that the contents of the loop can only get executed once, which shouldn't actually be the case. As far as I can tell, version 24.0.1 decompiles the loop correctly. - On line 688, the ret variable should be converted to a double (or Number), which isn't shown. - This one isn't important, but on lines 729 and 734, it should be possible to do normal breaks without having to label loop1. It still works correctly though, so again, this isn't so important.
Please try nightly 3425, it should be better. I have not fixed the last one "not important" - the loop1 break since I think this loop is pretty much correct.
Everything seems good now, thank you very much!
You're welcome. I just released 25.1.1.
State: upgraded→closed