📜 ⬆️ ⬇️

Abnormal behavior of Flash Player 11 depending on whether debug player or not

After updating to 11 player, we caught a very strange bug.

This bug appeared only in the non-debug version of the player. That is, when you launch the swf-ku in the debag 11th player - everything is fine, and when in normal mode nothing works.
I had to search for the problem using the ExternalInterface and JavaScript browser console.

As a result, the problem was as follows. In the non-debug version of Flash Player 11.0.1.152, this is the expression:

1/Math.abs(0)

Suddenly became equal to -Infinity
')
And in the debag version, everything remained within the normal picture of the world: Infinity

Full reproduce example code:

package {
import flash.display.Sprite;
import flash.external.ExternalInterface;
public class MagicWorld extends Sprite {
public function MagicWorld () {
ExternalInterface.call ("alert", "1 / Math.abs (0) =" + (1 / Math.abs (0)). ToString ());
}
}
}

You can make sure here: batsuev.com/habr/fp11/MagicWorld.html (open in debag and non-debag 11 player)

Bugreport link: bugbase.adobe.com/index.cfm?event=bug&id=3011557

A bit of fun:
1/0 // Infinity
1 / Math.abs (0) // - Infinity
0 == Math.abs (0) // true
1/0 == 1 / Math.abs (0) // false

Stay alert with this Adobe.

Source: https://habr.com/ru/post/131301/


All Articles