EasyWorker not working in projects using RSLs
I have a maven project that I am using FlexMojos to compile. When I specify the framework to be loaded as an RSL I receive the following runtime error. Im not sure if this is more of a FlexMojos issue or not, but maybe you and @chrisdutz could take a look? I've included the output of the error, as well as my pom. If I comment out the type configuration for the two dependencies under "RSL Dependencies", easyWorker works fine.
`<modelVersion>4.0.0</modelVersion>
<groupId>com.playground</groupId>
<artifactId>myArtifact</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>
<name>myArtifact Flex</name>
<properties>
<flex.mojo.version>7.1.0</flex.mojo.version>
<flex.sdk.version>4.14.1</flex.sdk.version>
<flex.groupId>org.apache.flex</flex.groupId>
<flashplayer.version>20.0</flashplayer.version>
<flexunit.version>4.3.0-SNAPSHOT</flexunit.version>
<language>en_US</language>
</properties>
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flex.mojo.version}</version>
<extensions>true</extensions>
<configuration>
<optimize>false</optimize>
<generateHtmlWrapper>true</generateHtmlWrapper>
<debug>true</debug>
<templateURI>folder:${basedir}/html-template</templateURI>
<parameters>
<expressInstallSwf>playerProductInstall.swf</expressInstallSwf>
<useBrowserHistory>--</useBrowserHistory>
<bgcolor>#ffffff</bgcolor>
<version_major>11</version_major>
<version_minor>8</version_minor>
<version_revision>0</version_revision>
</parameters>
<sourceFile>Main.mxml</sourceFile>
<rslUrls>
<url>rsl/{artifactId}-{version}.{extension}</url>
</rslUrls>
<removeUnusedRsls>true</removeUnusedRsls>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.flex</groupId>
<artifactId>compiler</artifactId>
<version>4.14.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe</groupId>
<artifactId>fontkit</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-wrapper</id>
<goals>
<goal>wrapper</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<!-- This copies all of the flex rsls and puts them into the /rsl folder -->
<execution>
<id>copy-rsls</id>
<phase>process-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>${flex.groupId}.framework</includeGroupIds>
<includeTypes>swf</includeTypes>
<excludeTransitive>true</excludeTransitive>
<outputDirectory>${basedir}/target/rsl</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${flex.groupId}</groupId>
<artifactId>framework</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flash.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>${flashplayer.version}</version>
<type>swc</type>
</dependency>
<dependency>
<groupId>${flex.groupId}.flexunit</groupId>
<artifactId>flexunit-flex</artifactId>
<version>${flexunit.version}</version>
<type>swc</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.doublefx</groupId>
<artifactId>easyWorker</artifactId>
<version>0.0.1</version>
<type>swc</type>
</dependency>
<!-- RSL Dependencies -->
<dependency>
<groupId>org.apache.flex.framework</groupId>
<artifactId>framework</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>rsl</scope>
</dependency>
<dependency>
<groupId>org.apache.flex.framework</groupId>
<artifactId>framework</artifactId>
<version>${flex.sdk.version}</version>
<classifier>${language}.rb</classifier>
<type>swc</type>
<scope>rsl</scope>
</dependency>
</dependencies>`
[trace] Type.forName error: A class with the name 'com.doublefx.as3.thread.api.IProperty' could not be found. The class 'com.doublefx.as3.thread.api.IProperty' is probably an internal class or it may not have been compiled. [trace] Type.forName error: A class with the name 'com.doublefx.as3.thread.api.SharableData' could not be found. The class 'com.doublefx.as3.thread.api.SharableData' is probably an internal class or it may not have been compiled. [trace] Type.forName error: A class with the name 'com.doublefx.as3.thread.api.IDataProducer' could not be found. The class 'com.doublefx.as3.thread.api.IDataProducer' is probably an internal class or it may not have been compiled. [trace] Type.forName error: A class with the name 'com.doublefx.as3.thread.util.AsynchronousDataManager' could not be found. The class 'com.doublefx.as3.thread.util.AsynchronousDataManager' is probably an internal class or it may not have been compiled. [trace] Type.forName error: A class with the name 'com.doublefx.as3.thread.error.IllegalStateError' could not be found. The class 'com.doublefx.as3.thread.error.IllegalStateError' is probably an internal class or it may not have been compiled. [trace] Type.forName error: A class with the name 'com.doublefx.as3.thread.error.UnsupportedOperationError' could not be found. The class 'com.doublefx.as3.thread.error.UnsupportedOperationError' is probably an internal class or it may not have been compiled. [trace] Dep: com.doublefx.as3.thread.api.Runnable tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/api/Runnable, Length: 456 [trace] Dep: com.test.ComplexWorker tag: [82:DoABC] Lazy: true, Name: com/test/ComplexWorker, Length: 921 [trace] Dep: com.doublefx.as3.thread.api.IWorker tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/api/IWorker, Length: 617 [trace] Dep: com.doublefx.as3.thread.event.ThreadFaultEvent tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadFaultEvent, Length: 1074 [trace] Dep: com.doublefx.as3.thread.event.ThreadProgressEvent tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadProgressEvent, Length: 1384 [trace] Dep: com.doublefx.as3.thread.event.ThreadResultEvent tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadResultEvent, Length: 1079 [trace] Dep: com.doublefx.as3.thread.event.ThreadActionRequestEvent tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadActionRequestEvent, Length: 834 [trace] Dep: com.doublefx.as3.thread.event.ThreadActionResponseEvent tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadActionResponseEvent, Length: 1100 [trace] Dep: com.doublefx.as3.thread.error.NotImplementedRunnableError tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/error/NotImplementedRunnableError, Length: 693 [trace] Dep: com.doublefx.as3.thread.api.CrossThreadDispatcher tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/api/CrossThreadDispatcher, Length: 1477 [trace] Dep: com.doublefx.as3.thread.util.ClassAlias tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/util/ClassAlias, Length: 555 [trace] Dep: com.doublefx.as3.thread.util.DecodedMessage tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/util/DecodedMessage, Length: 682 [trace] Dep: com.doublefx.as3.thread.util.Closure tag: [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/util/Closure, Length: 973 [trace] [SWF] [trace] Header: [trace] Version: 28 [trace] Compression: None [trace] FileLength: 20652 [trace] FileLengthCompressed: 20652 [trace] FrameSize: (550,400) [trace] FrameRate: 50 [trace] FrameCount: 1 [trace] Tags: [trace] [69:FileAttributes] AS3: true, HasMetadata: true, UseDirectBlit: false, UseGPU: false, UseNetwork: false [trace] [64:EnableDebugger2] Password: null, Reserved: 0x1975 [trace] [09:SetBackgroundColor] Color: #ffffff [trace] [77:Metadata] <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> [trace] <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1"> [trace] dc:formatapplication/x-shockwave-flash/dc:format [trace] dc:titlemyArtifact Flex/dc:title [trace] dc:languageen_US/dc:language [trace] dc:date6/21/16 3:07 PM/dc:date [trace] /rdf:Description [trace] /rdf:RDF [trace] [65:ScriptLimits] MaxRecursionDepth: 1000, ScriptTimeoutSeconds: 60 [trace] [41:ProductInfo] ProductID: 3, Edition: 6, Version: 4.14 r20150325, CompileDate: Tue Jun 21 15:07:24 GMT-0600 2016 [trace] [43:FrameLabel] Name: ThreadRunner [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/api/Runnable, Length: 456 [trace] [82:DoABC] Lazy: true, Name: com/test/ComplexWorker, Length: 921 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/api/IWorker, Length: 617 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadFaultEvent, Length: 1074 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadProgressEvent, Length: 1384 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadResultEvent, Length: 1079 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadActionRequestEvent, Length: 834 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/event/ThreadActionResponseEvent, Length: 1100 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/error/NotImplementedRunnableError, Length: 693 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/api/CrossThreadDispatcher, Length: 1477 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/util/ThreadRunner, Length: 7568 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/util/ClassAlias, Length: 555 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/util/DecodedMessage, Length: 682 [trace] [82:DoABC] Lazy: true, Name: com/doublefx/as3/thread/util/Closure, Length: 973 [trace] [76:SymbolClass] [trace] Symbols: [trace] [0] TagID: 0, Name: com.doublefx.as3.thread.util.ThreadRunner [trace] [01:ShowFrame] [trace] [00:End] [trace] Thread start [trace] Thread State: running [Fault] exception, information=VerifyError: Error #1014: Class mx.core::DebuggableWorker could not be found. java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at flash.tools.debugger.concrete.DManager.getFrame(DManager.java:927) at flash.tools.debugger.concrete.PlayerSession.pullUpActivationObjectVariables(PlayerSession.java:1119) at flash.tools.debugger.concrete.PlayerSession.requestFrame(PlayerSession.java:1095) at flash.tools.debugger.concrete.PlayerSession.getValueWorker(PlayerSession.java:1217) at flash.tools.debugger.concrete.IsolatePlayerSession.getValue(IsolatePlayerSession.java:127) at flex.tools.debugger.cli.ExpressionContext.memberNamed(ExpressionContext.java:444) at flex.tools.debugger.cli.ExpressionContext.locateParentForNamed(ExpressionContext.java:546) at flex.tools.debugger.cli.ExpressionContext.determineContext(ExpressionContext.java:496) at flex.tools.debugger.cli.ExpressionContext.resolveToVariable(ExpressionContext.java:356) at flex.tools.debugger.cli.ExpressionContext.lookup(ExpressionContext.java:175) at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:164) at macromedia.asc.parser.ThisExpressionNode.evaluate(ThisExpressionNode.java:32) at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:1033) at macromedia.asc.parser.ListNode.evaluate(ListNode.java:42) at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:1033) at macromedia.asc.parser.ListNode.evaluate(ListNode.java:42) at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:1067) at macromedia.asc.parser.ExpressionStatementNode.evaluate(ExpressionStatementNode.java:48) at flash.tools.debugger.expression.DebuggerEvaluator.evaluate(DebuggerEvaluator.java:1308) at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:78) at flash.tools.debugger.expression.DebuggerExpression.evaluate(DebuggerExpression.java:111) at flex.tools.debugger.cli.ExpressionCache.evaluate(ExpressionCache.java:109) at flex.tools.debugger.cli.DebugCLI.evalExpression(DebugCLI.java:3661) at flex.tools.debugger.cli.DebugCLI.evalExpression(DebugCLI.java:3654) at flex.tools.debugger.cli.DebugCLI.doPrint(DebugCLI.java:3593) at flex.tools.debugger.cli.DebugCLI.processLine(DebugCLI.java:6318) at flex.tools.debugger.cli.DebugCLI.process(DebugCLI.java:781) at flex.tools.debugger.cli.DebugCLI.execute(DebugCLI.java:630) at flex.tools.debugger.cli.DebugCLI.main(DebugCLI.java:401)