JPEXS Free Flash Decompiler Issue Tracker

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

: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means waiting times in the issue tracker are very long and mostly depend on community. Sorry for the inconvenience.

List of issuesList of issues

#4 Stack overflow on large classes (decompile individual methods would be a nice feature)
Date created:
Type: feature
Visibility: Everybody
Assigned to:
Labels: AS3DecompilationGoogle Code
State: closed Help

<b>What steps will reproduce the problem?</b> 1. Get a swf with a giant class in it (60000+ lines of code) 2. Decompile 3. public function theLastFuntionSuccessfullyDecompiled(params: ParamType) : ReturnType { /* * Decompilation error * Code may be obfuscated * Error Message: StackOverflow on line &lt;linenumber&gt; */ } <b>What is the expected output? What do you see instead?</b> A decompiled class is expected, a mostly decompiled file is what I get. <b>What version of the product are you using? On what operating system?</b> v. beta 1, Windows vista <b>Please provide any additional information below.</b> A &quot;decompile individual methods&quot; feature would be nice, so one could decompile important bits without having it choke on a giant class, or to pick up decompiling where it left off.
user
Disregard what I said about a large class, It appears to occur on large methods. I'm not sure what can be done about that, though a decompile-individual-methods feature would still be nice. Edited and more accurate problem report to follow: What steps will reproduce the problem? 1. Get a swf with a a class with one or multiple large(?) methods 2. Decompile 3. public function aFunction(params: ParamType) : ReturnType { /* * Decompilation error * Code may be obfuscated * Error Message: StackOverflow on line <linenumber> */ } What is the expected output? What do you see instead? A decompiled class is expected, a mostly decompiled file is what I get. What version of the product are you using? On what operating system? v. beta 1, Windows vista Please provide any additional information below. I'm not sure what causes this to happen, but it happens consistently on certain methods, all of which are large compared to the others.
admin
Thank you for reporting. Program has limitation for maximum number of subjumps. It is currently set to fixed number (255). This is not a bug, it was intended as protection against code obfuscators, because if there was no limit, then decompiler probably goes into infinite loop and then crashes (like most commercial decompilers do). As you wrote, value of 255 is too low for a large classes. If you want to fix it for yourself, you can download sources and change com.jpexs.asdec.abc.avm2.AVM2Code on line 1034 to a larger value if (toSourceCount > 255) { //This is it throw new ConvertException("StackOverflow", start); } and then compile it for yourself. I won't do it myself because I don't currently know which value is optimal. If I put large value here, then decompilation/dissasembling of obfuscated will be very slow. One thing I can do in the future: Put the value in some configuration file or application menu so anyone can change it. Second thing: Decompiling individual methods is good idea. Some kind of "decompile on demand" feature will be nice. I will think about it...
admin
Hi I made some changes to the code - protection against obfuscation is now optional (via Menu Tools->Deobfuscation) so the StackOverflow exception will be displayed only if you turn it on. You can download version 1.0.0. Sorry for answering too late.
user
State: →closed
Title: Stack overflow on large classes (decompile individual methods would be a nice feature)→Stack overflow on large classes (decompile individual methods would be a nice feature)
Type: →feature
Visibility: →Everybody