Air 22 crashed after using NativeWindow.globalToScreen on windows 7.
Air 22 crashed after calling NativeWindow.globalToScreen many times on windows 7 x85 and x64.
And this bug does not exist on windows8 and mac.
Test code:
public function Demo()
{
this.stage.addEventListener(Event.ENTER_FRAME,enterFrame_handler);
}
private var n:int = 0;
protected function enterFrame_handler(event:Event):void
{
var pos:Point = new Point(this.stage.mouseX,this.stage.mouseY);
var globalPos:Point = this.stage.nativeWindow.globalToScreen(pos);
trace(pos,globalPos,n);
n++;
}
The console log:
(x=500, y=225) (x=558, y=305) 9928
(x=500, y=225) (x=558, y=305) 9929
(x=500, y=225) (x=558, y=305) 9930
(x=500, y=225) (x=558, y=305) 9931
(x=500, y=225) (x=-2147483148, y=-2147483423) 9932
(x=500, y=225) (x=-2147483148, y=-2147483423) 9933
(x=500, y=225) (x=-2147483148, y=-2147483423) 9934
(x=500, y=225) (x=-2147483148, y=-2147483423) 9935
(x=500, y=225) (x=-2147483148, y=-2147483423) 9936
(x=500, y=225) (x=-2147483148, y=-2147483423) 9937
When negative numbers appear, the window has crashed.
I think it might be related to the glass wool effect of windows7. May be memory overflow?
Waitting for your reply.
Thanks very much. ![]()
