bufanliu / apparat

Automatically exported from code.google.com/p/apparat
0 stars 0 forks source link

Java heap memory #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. compress a very big SWF file
2. I used that command line:
sh scala -cp /Users/romuald/scala/apparat/apparat.jar 
apparat.tools.reducer.Reducer -
Dapparat.7z.path=/Applications/7zX.app/Contents/Resources/7za -i 
/Users/romuald/Documents/devserver/temp/apparat/source.swf -o 
/Users/romuald/Documents/devserver/temp/apparat/output.swf

What is the expected output? What do you see instead?

Going through the process

What version of the product are you using? On what operating system?

Mac OSX 10.6.3
Scala code runner version 2.8.0.RC3 -- Copyright 2002-2010, LAMP/EPFL
Apparat 1.0 snapshot

Please provide any additional information below.

I get the output:

[i] Apparat -- http://apparat.googlecode.com/
[i] Launching tool: Reducer
[-] Java heap space
java.lang.OutOfMemoryError: Java heap space
    at apparat.swf.Swf.uncompress(Swf.scala:192)
    at apparat.swf.Swf.read(Swf.scala:105)
    at apparat.swf.Swf$.fromInputStream(Swf.scala:61)
    at apparat.utils.SwfStrategy.read(TagContainer.scala:110)
    at apparat.utils.TagContainer.read(TagContainer.scala:64)
    at apparat.tools.reducer.Reducer$ReducerTool.run(Reducer.scala:52)
    at apparat.tools.ApparatApplication$.apply(ApparatApplication.scala:31)
    at apparat.tools.reducer.Reducer$.main(Reducer.scala:17)
    at apparat.tools.reducer.Reducer.main(Reducer.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at scala.tools.nsc.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.scala:81)
    at scala.tools.nsc.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:24)
    at 
scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.
scala:86)
    at scala.tools.nsc.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:81)
    at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:86)
    at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:83)
    at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
[i] Completed in 348ms.

I tried to compress a big SWF file of a project I'm working on (113 Mb), I was 
getting the  same 
error memory error when I compiled my project with ANT+FDT.

To solve it and be able to compile, I had to allow more java memory in the 
mxmlc script of the 
flex SDK. Any way we could set the java memory used by apparat?

Just a quick try, let me know if I'm doing something wrong.

Thanks

Romu

Original issue reported on code.google.com by sounds...@gmail.com on 4 Jun 2010 at 5:13

GoogleCodeExporter commented 9 years ago
You can increase the Java always the same. This is not an Apparat issue. You 
could try 
passing "-Xmx512M -Xms512M" as parameters to the Java VM. If that is not enough 
you can 
of course increase the amount of memory.

Original comment by joaebert on 4 Jun 2010 at 10:26