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

#956 AS3 decompilation error - Invalid jump
Author: developer honfika
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: closed Help

> What steps will reproduce the problem? Open vipAug1_mod.swf find the class from exception message. > What is the expected output? What do you see instead? Jul 07, 2015 9:57:31 PM com.jpexs.decompiler.flash.abc.types.MethodBody convert SEVERE: Decompilation error in fl.data/DataProvider.getDataFromObject java.util.concurrent.ExecutionException: com.jpexs.decompiler.flash.abc.avm2.ConvertException: Invalid jump to ofs2888231 on line -1 at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at com.jpexs.helpers.CancellableWorker.get(CancellableWorker.java:102) at com.jpexs.helpers.CancellableWorker.call(CancellableWorker.java:120) at com.jpexs.decompiler.flash.abc.types.MethodBody.convert(MethodBody.java:286) at com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter.convert(TraitMethodGet terSetter.java:87) at com.jpexs.decompiler.flash.abc.types.traits.Traits$TraitConvertTask.call(Traits.java:138) at com.jpexs.decompiler.flash.abc.types.traits.Traits.convert(Traits.java:189) at com.jpexs.decompiler.flash.abc.types.traits.TraitClass.convert(TraitClass.java:562) at com.jpexs.decompiler.flash.abc.types.traits.Trait.convertPackaged(Trait.java:171) at com.jpexs.decompiler.flash.abc.ScriptPack.convert(ScriptPack.java:153) at com.jpexs.decompiler.flash.abc.ScriptPack$1.call(ScriptPack.java:187) at com.jpexs.decompiler.flash.abc.ScriptPack$1.call(ScriptPack.java:184) at com.jpexs.helpers.CancellableWorker$3.doInBackground(CancellableWorker.java:115) at com.jpexs.helpers.CancellableWorker$1.call(CancellableWorker.java:49) at java.util.concurrent.FutureTask.run(Unknown Source) at com.jpexs.helpers.CancellableWorker.run(CancellableWorker.java:66) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: com.jpexs.decompiler.flash.abc.avm2.ConvertException: Invalid jump to ofs2888231 on line -1 at com.jpexs.decompiler.flash.abc.avm2.AVM2Code.adr2pos(AVM2Code.java:1331) at com.jpexs.decompiler.flash.abc.avm2.AVM2Code.adr2pos(AVM2Code.java:1315) at com.jpexs.decompiler.flash.abc.avm2.graph.AVM2GraphSource.adr2pos(AVM2GraphSource.java:111 ) at com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction.getBranches(AVM2Instructi on.java:375) at com.jpexs.decompiler.graph.GraphSource.visitCode(GraphSource.java:82) at com.jpexs.decompiler.graph.GraphSource.visitCode(GraphSource.java:85) at com.jpexs.decompiler.graph.GraphSource.visitCode(GraphSource.java:85) at com.jpexs.decompiler.graph.GraphSource.visitCode(GraphSource.java:85) at com.jpexs.decompiler.graph.GraphSource.visitCode(GraphSource.java:100) at com.jpexs.decompiler.graph.Graph.makeGraph(Graph.java:1983) at com.jpexs.decompiler.graph.Graph.init(Graph.java:86) at com.jpexs.decompiler.flash.abc.avm2.graph.AVM2Graph.translateViaGraph(AVM2Graph.java:137) at com.jpexs.decompiler.flash.abc.avm2.AVM2Code.toGraphTargetItems(AVM2Code.java:1884) at com.jpexs.decompiler.flash.abc.types.MethodBody$1.call(MethodBody.java:280) at com.jpexs.decompiler.flash.abc.types.MethodBody$1.call(MethodBody.java:275) ... 7 more
developer
In this swf there is a jump to an invalid address. In the following commmit why did you removed the fixJumps call? (//code.fixJumps(body);) https://github.com/jindrapetrik/jpexs-decompiler/commit/df36ce3548f8c680a4a4f10d9bab69a673 6561d6 When i uncomment that line, it works.
admin
I was doing large testing of the deobfuscation, commented out some parts and then put it back. I left this commented out since all examples I had were working with that config. Now I see we need that part since there can be invalid jumps even in code which is not unreachable. The SWF would probably failed to load that method because of verification. You can put the line back, I am not on my computer now.
developer
I tried to reproduce this problem in run.swf, but it shows: VerifyError: Error #1021: At least one branch target was not on a valid instruction in the method. when the method is called as you said (even when the jump is unreachable). Probably it is the same with vipAug1_mod.swf... so it is broken. The decompilation exception is correct. I'm sorry for the report. So everything is ok now, fixJumps is not needed.
State: new→invalid
admin
The decompilation exception is correct, but it should probably display the rest of the code, just fail somehow gracefully, log warning instead of discarding whole method body. I think the fixJumps should be there somehow... Because when you remove the jump, the code is otherwise correct.
State: invalid→new
developer
Ok, temporary i uncommented that line, now it seems to be ok.
admin
It is in the repository. It displays warning. I placed the fixjumps to correct place - in the convertMethodBody no matter on AutoDeobfuscate switch as it is not deobfuscation thing. Also the fixjumps does not really fix the offsets. It just removes the instructions. It sounds better to me than creating some invalid code flow.
State: new→upgraded
developer
ok, thanks.
State: upgraded→closed