2 Replies Latest reply on Feb 11, 2011 6:29 AM by buethling

    TestRunner hangs randomly


      Hi All,


      I am experiencing an issue where while running through our tests the Flash plugin will hang and crash randomly throughout the process. I am using Flash plugin version and we have roughly 600 tests. We have tried to be as concious about memory consumption as possible in our tests, using the before and after meta data to remove and nullify objects but we are basically unable to run the tests all the way through most of the time.


      Currently we are working on making deconstructors for some of the classes that are hogging the most memory, as seen in the profiler. Any recommendations as to what we can do?

        • 1. Re: TestRunner hangs randomly
          mlabriola Level 4

          Usually when this happens an uncaught error (usually do to something asynchronous not using the Async API, an asynchronous race condition or an asynchronous error) is getting thrown outside of the FlexUnit framework.


          What version of FlexUnit are you using currently? If you are using the 4.1 release candidate 2, you add an uncaughtErrorHandler.


          While FlexUnit can't recover gracefully from this error, it will at least stop the possibility of hanging and help you understand where the issue may exist.


          In your runner, the uncaught error handler is added to the core, passing it the loaderInfo


          core = new FlexUnitCore();

          core.addUncaughtErrorListener( systemManager.loaderInfo ); //or any valid reference to the loaderInfo

          core.addListener( CIListener );

          core.run( SimpleTest );

          This would be my first/best suggestion for you. If it yields more information, we can work our way backward to find the actual root cause.If it doesn't help, we can also try more things. One more issue, the 4,1 rc2 candidate shortens the stack depth considerably from previous versions. If you aren't yet running that version, it may be worth it just for that dianostic alone.

          • 2. Re: TestRunner hangs randomly
            buethling Level 1

            Thanks, Mike we do have more than a couple errors popping up when we run the tests using the flash debugger and we are working on fixing those. We are currently using Flexunit 4.0 stable but I'll see if we can try out 4.1 rc2 and try out the uncaughtErrorHandler and let you know what we find.


            Thanks again for your quick response!