title: Very fast firing of events causes "undefined" error using as3commons-async framework
body: <p>I have implemented a simple sync routine using the as3commons-async framework (which I thought to be stable as a rock)</p>
  
  <p>I have a CompositeCommand containing a high number of other commands, which can also be composite commands.</p>
  
  <p>Now some strange thing happens:</p>
  
  <p>When executed slowly (over the web) everything works as expected.</p>
  
  <p>Now I leave out the part doing the heavy load causing the commands to run at "machine" speed.</p>
  
  <p>After a couple of dozens, sometimes more than a hundred "progress" events fired, AIR player crashes with this error message:</p>
  
  <pre><code>undefined
  at org.as3commons.async.operation.impl::AbstractProgressOperation/dispatchProgressEvent()[C:\projects\as3-commons\as3-commons-async\src\main\actionscript\org\as3commons\async\operation\impl\AbstractProgressOperation.as:135]
  at org.as3commons.async.command.impl::CompositeCommand/onCommandResult()[C:\projects\as3-commons\as3-commons-async\src\main\actionscript\org\as3commons\async\command\impl\CompositeCommand.as:287]
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at org.as3commons.async.operation.impl::AbstractOperation/dispatchCompleteEvent()[C:\projects\as3-commons\as3-commons-async\src\main\actionscript\org\as3commons\async\operation\impl\AbstractOperation.as:152]
  </code></pre>
  
  <p>looking at the AbstractProgressOperation code in the async lib at the given line, there's nothing really done there:</p>
  
  <pre><code>/**
       * Convenience method for dispatching a &lt;code&gt;OperationEvent.PROGRESS&lt;/code&gt; event.
       * @return true if the event was dispatched; false if not
       */
      protected function dispatchProgressEvent():void {
          dispatchEvent(OperationEvent.createProgressEvent(this));
      }
  </code></pre>
  
  <p>I can rule out my code as the culprit as well, as all parts of it are working seperately and are tested in many other aspects. Plus I don't really do anything either right now other than calling execute() on the command and fire an complete event.</p>
  
  <p>For debugging I added some heavy trace() calls, which assumingly causes a slight delay, and voilà, it now crashes some lines further down in the code, still with "undefined" pointing a line in the code which is very unsuspicious. (once it was a call to invalidateDisplayList() in a component used for several years now without ever having made any problems)</p>
  
  <p>Did anybody else encounter problems before when a large set of events is fired in very short time? What else can cause this strange "undefined" ?</p>
  
  <p>Thanks as always.</p>