Having trouble using the "optimize-swf" goal of a flexmojos-4 buid

87 views
Skip to first unread message

Christofer Dutz

unread,
Apr 7, 2011, 2:34:23 AM4/7/11
to apparat-...@googlegroups.com
Hi,

I am currently trying to get my release builld working in a 20-swf and
about 30-swc sized Project. Currently the resulting SWFs are 30MB
together.
The optimization of mmost of the swfs works great and the size is
reduced 50%-66%. Unfortunately there are some modules, I can't
optimize. Whenever these modules are optimized, I get an

<function0>: caught java.util.NoSuchElementException: key not found:
[[Kill(2)\nLookupSwitch(L16,[L17,L16])]]

And from there on the build never stops, but at least stops hogging
all my CPU time :-)

Here comes the fulll trace:


[INFO] --- flexmojos-maven-plugin:4.0-beta-6:optimize-swf (default) @
cweb-mod.artists.client ---
[INFO] Flexmojos 4.0-beta-6
[INFO] Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
C:\Projects\C-Ware\Electronic-Emotions\trunk\modules\cweb-mod.events\client-artists\target\classes\original.swf
(516072 bytes)
C:\Projects\C-Ware\Electronic-Emotions\trunk\modules\cweb-mod.events\client-artists\target\classes\optimized.swf
(514912 bytes)
[INFO] Merging identical control flow ...
[INFO] Merging ABC files ...
[INFO] Rebuilding constant pool ...
[WARNING] Only raw bytecode will be checked for identity.
[INFO] Rebuilding constant pool ...
[WARNING] Only raw bytecode will be checked for identity.
[INFO] Creating LZMA compressed file.
[INFO] Compression ratio: -1,80%
[INFO] Total bytes: -9248
[INFO] Merging identical control flow ...
<function0>: caught java.util.NoSuchElementException: key not found:
[[Kill(2)\nLookupSwitch(L16,[L17,L16])]]
java.util.NoSuchElementException: key not found:
[[Kill(2)\nLookupSwitch(L16,[L17,L16])]]
at scala.collection.MapLike$class.default(MapLike.scala:223)
at scala.collection.immutable.HashMap.default(HashMap.scala:35)
at scala.collection.MapLike$class.apply(MapLike.scala:134)
at scala.collection.immutable.HashMap.apply(HashMap.scala:35)
at apparat.graph.ControlFlowGraphBytecodeBuilder$$anonfun$toBytecode$2$$anonfun$6.apply(ControlFlowGraphBytecodeBuilder.scala:97)
at apparat.graph.ControlFlowGraphBytecodeBuilder$$anonfun$toBytecode$2$$anonfun$6.apply(ControlFlowGraphBytecodeBuilder.scala:97)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
at scala.collection.immutable.List.map(List.scala:45)
at apparat.graph.ControlFlowGraphBytecodeBuilder$$anonfun$toBytecode$2.apply(ControlFlowGraphBytecodeBuilder.scala:97)
at apparat.graph.ControlFlowGraphBytecodeBuilder$$anonfun$toBytecode$2.apply(ControlFlowGraphBytecodeBuilder.scala:96)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at apparat.graph.ControlFlowGraphBytecodeBuilder$.toBytecode(ControlFlowGraphBytecodeBuilder.scala:96)
at apparat.graph.ControlFlowGraphBytecodeBuilder$.apply(ControlFlowGraphBytecodeBuilder.scala:301)
at apparat.graph.mutable.MutableBytecodeControlFlowGraph.bytecode(MutableBytecodeControlFlowGraph.scala:91)
at apparat.tools.reducer.Reducer$ReducerTool$$anonfun$run$3$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$3$$anonfun$apply$4.apply(Reducer.scala:94)
at apparat.tools.reducer.Reducer$ReducerTool$$anonfun$run$3$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$3$$anonfun$apply$4.apply(Reducer.scala:92)
at scala.Option.foreach(Option.scala:121)
at apparat.tools.reducer.Reducer$ReducerTool$$anonfun$run$3$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$3.apply(Reducer.scala:92)
at apparat.tools.reducer.Reducer$ReducerTool$$anonfun$run$3$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$3.apply(Reducer.scala:91)
at scala.Option.foreach(Option.scala:121)
at apparat.tools.reducer.Reducer$ReducerTool$$anonfun$run$3$$anonfun$apply$1$$anonfun$apply$2.apply(Reducer.scala:91)
at apparat.tools.reducer.Reducer$ReducerTool$$anonfun$run$3$$anonfun$apply$1$$anonfun$apply$2.apply(Reducer.scala:90)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:34)
at apparat.tools.reducer.Reducer$ReducerTool$$anonfun$run$3.apply(Reducer.scala:87)
at apparat.tools.reducer.Reducer$ReducerTool$$anonfun$run$3.apply(Reducer.scala:85)
at apparat.swf.SwfTagMapping$$anonfun$2$$anonfun$apply$1.apply(SwfTagMapping.scala:41)
at apparat.swf.SwfTagMapping$$anonfun$2$$anonfun$apply$1.apply(SwfTagMapping.scala:41)
at scala.actors.Futures$$anonfun$1.apply(Future.scala:128)
at scala.actors.Futures$$anonfun$1.apply(Future.scala:128)
at scala.actors.FutureActor$$anonfun$act$1.apply(Future.scala:94)
at scala.actors.FutureActor$$anonfun$act$1.apply(Future.scala:94)
at scala.actors.Reactor$class.seq(Reactor.scala:280)
at scala.actors.FutureActor.seq(Future.scala:56)
at scala.actors.Reactor$$anon$3.andThen(Reactor.scala:258)
at scala.actors.FutureActor.act(Future.scala:95)
at scala.actors.Reactor$$anonfun$dostart$1.apply(Reactor.scala:222)
at scala.actors.Reactor$$anonfun$dostart$1.apply(Reactor.scala:222)
at scala.actors.ReactorTask.run(ReactorTask.scala:36)
at scala.concurrent.forkjoin.ForkJoinPool$AdaptedRunnable.exec(ForkJoinPool.java:611)
at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:422)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:340)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:325)

Here comes the confguration of the optimize-swf goal taken from my
master pom (I got the same errors without any config section)


<profile>
<id>release</id>

<properties>
<flex.debug>false</flex.debug>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>optimize-swf</goal>
</goals>
<configuration>
<reduce>true</reduce>
<reduceLzma>true</reduceLzma>
<!--reduceDeblock>true</reduceDeblock-->
<reduceLzma>true</reduceLzma>
<reduceQuality>1.0</reduceQuality>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

Chris

Reply all
Reply to author
Forward
0 new messages