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 issues#2699 P-Code to ActionScript interpretation
Author:
KouGou
KouGouDate created:
Type: feature
Visibility: Everybody
Assigned to:
State: new 

Hi everyone, I am not sure if this is considered a bug, product limitation or just a
missing feature so I'll just raise it as one:
If decompiled AS file contains -> "debugfile", "debugline" or "debug" in its P-Code, it is
not reflected in the ActionScript source. Therefore, if a change is made to the
ActionScript and saved, it will wipe out these debug lines from the P-Code. (which would
cause crash in the application where the SWF file is used since it depends on these debug
lines)
PS: This is present in both latest and old versions. I have attached example SWF (v31)
Thank you
damageText.swf (97 KiB)It is not a bug.
In p-code view, we display these instructions,
but when you direct edit AS, we do not generate these.
This info is optional and if the app crashes without
having them, then there is surely problem somewhere else,
in compilation itself.
This info is for the debugger, the app should not depend on it.
I am against adding these instructions since they will not match original file used.
Also we cannot use the lines that were there before as we decompile code differently.
Thank you for your response. Just to clarify, the crash does not occur in JPEXS, it is in
the game that runs the SWF because its GFx loader depends on these lines. They are not
related to the JPEXS' debugger.
Right now it is incredibly challenging writing complex functions only through the P-Code,
hence why I wanted to know if there are any alternatives that would ease my work.
Thank you
Sorry, I don't believe the GFx loader depends on these lines.
It must be something else. Either FFDec is compiling the code wrong or the game checks for
example a hash of the entire swf and then crashes when it does not match.
Try these two for me:
1) Take original unedited SWF and edit sample method with P-code editation and remove all
the debugfile/debugline/debug lines, then save,
then run the game with it. Check if crashes or not
2) Take the unedited SWF again and edit sample method with P-code editation and add
instruction "nop" somewhere in the code, then save and run the game, check whether it
crashes or not.
If it crashes in case 1 and not in case 2, then you're right.
If it crashes in both cases, then the game checks for SWF hash or something.
If it does not crash in both cases, then it is FFDec actionscript compilation problem what
makes your game crash.
