Getting an error when building my Kaltura plugins with Flex unit testing


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

	at flash.display::MovieClip/nextFrame()
	at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\]
	at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\]
	at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\]
	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:

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
  • air framework sdk version
  • 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.

There are 2 releases for each KDP because Adobe had changed their API between SDK 4.5 and 4.6. Our project knows to get that switch and compile different code for SDK 4.5 and 4.6 from a custom compilation additionalCompilerArguments we have added

In this way we can compile one thing for SDK 4.6 and another to 4.5

try to set isSDK45 to true and isSDK46 to false see if that helps. if not maybe try vice versa

See example here: