I’ve encountered an unusual error that involves a collection of systems. We’re running a maven build system (pom.xml) that builds all our flash plugins for our video player. I recently was tasked to add FlexUnit testing into it. The unit testing works fine, but the code coverage feature that comes with it does not. If I have code coverage turned off, my whole build system works. If I turn code coverage back on, I get this error on any plugin that imports any class from the kdp3lib SWC:
VerifyError: Error #1053: Illegal override of removeChildren in com.yahoo.astra.fl.controls.containerClasses.ButtonBar. at flash.display::MovieClip/nextFrame() at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284] at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515] at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick()
From what I gather, if code coverage is turned off then flexunit builds a test app of my plugin with only the code that is used, which makes sense. When code coverage is turned on, the entire library of code is included when it compiles the test app (in order to calculate code coverage) which ends up importing a class that it doesn’t like.
The class it referenced is located here: https://github.com/kaltura/kdp/blob/master/kdp3Lib/src/com/yahoo/astra/fl/controls/containerClasses/ButtonBar.as
You can see that on line 226, it defines a removeChildren() method. As far as I can tell, this should work fine, but when everything compiles together for code coverage it apparently does not work.
According to my Maven setup, all my dependencies should be using the correct version:
- flexmojos-maven-plugin version 4.0-RC2
- flexmojos-unittest-flexunit4 version 4.0-RC2
- flex framework sdk version 126.96.36.19928
- air framework sdk version 188.8.131.5228
- flash player version 10.2
- kaltura kdp3lib version 3.9.2
Even though my kdp3lib is 3.9.2 and I see that the latest is 3.9.9, I noticed that none of the classes involved have changed in the past 3 years, so it shouldn’t be an issue.
I realize this error has likely not been encountered by many, but does anyone have any ideas on what I can try to fix this? The unit testing works, which is fine, but if I could get code coverage to work too then this would be an amazing setup I have for our company.