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

#2415 Bug when building the P-Code from internal functions edited in the AS editor
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: new Help

> What steps will reproduce the problem? This is the snippet where I first realized that the problem had something to do with the P-Code, although I've ran into it before as well. private function addSkill(param1:String) : void { var t2:Text; var name:String = param1; ... if(crewMember.isIdleOrInjured()) { raiseButton = new ButtonHud(function():void { raiseSkill(name,t2); },"button_pay.png"); ... } ... } I have left out the irrelevant code and replaced it with ... as we're only interested in the variables `name`, `t2` and the inline function supplied to the `ButtonHud` constructor. > What is the expected output? What do you see instead? This is the code section from the generated P-Code code findpropstrict QName(PrivateNamespace("core.hud.components:CrewDetails"),"raiseSkill") getlex QName(PackageNamespace(""),"name") getlex QName(PackageInternalNs("core.hud.components"),"t2") callpropvoid QName(PrivateNamespace("core.hud.components:CrewDetails"),"raiseSkill"), 2 returnvoid end ; code The problem is with the line that's fetching the name variable. It should look like this getlex QName(PackageInternalNs("core.hud.components"),"name") > What version of the product are you using? Is it "nightly build"? Which operating system do you have? I'm using version 21.1.1 and it's not a nightly build. I'm unaware if this specific issue has been fixed in the newest release. > Please provide any additional information below. If the problem is related to a SWF file, attach it here, otherwise we can't help you. I came across this problem on several occasions in this specific SWF file. It's the client for a game called AstroFlux which I've been modding over the past year. There are also some obfuscation issues in the AS code as well, but I haven't mentioned them partly because this isn't the bug I'm talking about here and there very easy to fix by hand. I've provided the default SWF file the game uses upon opening it, without any of my changes. This should also have those obfuscations as well. The location of the specific snippet of code I encountered my problem is in scripts/core.hud.components.CrewDetails with the addSkill function starting on line 546 and ending on line 601. The inline function is on line 591.
DownloadPreload.swf (1,843 KiB)