I've just submitted this bug. I wonder if any busy loop user (game, 
animations) have vere seen it.

Enri

See code below to reproduce the bug

Steps to reproduce:
1. add a busy loop: enter_frame or timer with 1 ms resolution
2. inside the loop set the text property of a Label or TextArea to 
'\n'
3. outside the loop, for example in a click event, addChild of a 
custom component extending Canvas (or any other container) and 
including anything
 
 Actual Results:
 a click on the application area doesn't show anything. If resized 
(when running on flash player) the custom component appears, but the 
display is corrupted and inconsistent
 
 Expected Results:
 the custom component is added and showed
 
 Workaround (if any):
 use '\r' instead of '\n'

Comments:
This seems a race condition. If timer resolution is set to 2 ms, the 
bug appears less frequently. If set to 3 ms the bug disappears (all 
this on a recent notebook)
I've found this bug both on flash player 9 and 10, and on air 1.5
I suspect that this bug appears also using PopupManager.

# begin code: sampleApp.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
  xmlns:mx="http://www.adobe.com/2006/mxml"; 
  applicationComplete="f()"
  >
  <mx:Script>
    <![CDATA[
      private function f():void {
//        var t:Timer = new Timer(1);
//        t.start();
//        t.addEventListener(TimerEvent.TIMER, function (e:*):void 
{test.text = '\n' });
        addEventListener(Event.ENTER_FRAME, function (e:*):void 
{test.text = '\n' });    // with '\r' works
        addEventListener(MouseEvent.CLICK,  function (e:*):void {
          addChild(new MyComponent);
        });
      }
    ]]>
  </mx:Script>
  <mx:Label id="test"/>
</mx:Application>
# end sampleApp.mxml

# begin code: MyComponent.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml";>
  <mx:Button/>
</mx:Canvas>
# end MyComponent.mxml
 
 


Reply via email to