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.

#105 Infinite loops
Author:
pepka

Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS3Decompilation
State: closed 

> What steps will reproduce the problem?
If statment with an empty body inside of the loop leads to strange decompilation in the
attached sample.
> What is the expected output? What do you see instead?
do
{
if (!(var1.x + var1.y <= param1))
{
}
var2--;
}
while (var2 >= 0);
is decompiled as
do
{
if(var1.x+var1.y>param1)
{
}
var2--;
if(var2<0)
{
}
else
{
continue;
}
}
while(true);
Actually I saw such a pattern before and it still persists -
if(var2<0)
{
}
else
{
continue;
}
is wrapped into infinite loop instead of
if(var2<0)
{
break;
}
which would be still not exact decompilation but could at least save the program's
behaviour. See also another example in attachment - double_break.swf.
> What version of the product are you using? On what operating system?
1.6.0u1
State: new→opened
version 1.6.1 was released. This should be fixed.
State: opened→upgraded
Hi,
now for empty_if.swf it become more wierd:
if(!isNaN(param1))
{
while(if(var1.x+var1.y>param1)
{
}, var2--, var2>=0)
{
}
}
And for double_break.swf just persists.
State: upgraded→opened
Version 1.6.2 was released.
Loop detection algorithm is completely new, so the loop problems should be history, try
it.
State: opened→upgraded
Hi,
these two have gone! Thanks!
State: upgraded→closed