Menu

Out of memory errors on compile

Help
Marc
2009-04-02
2013-04-26
  • Marc

    Marc - 2009-04-02

    Hi,
    I'm having some OutOfMemory errors when trying to compile a project with some child flex projects... is there any way to specify the max memory value for the compiler?

    thanks,

    Marc Baiges Camprubí

    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Java heap space
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    java.lang.OutOfMemoryError: Java heap space
        at java.util.AbstractList.iterator(AbstractList.java:337)
        at macromedia.asc.embedding.avmplus.InstanceBuilder.ExplicitGet(InstanceBuilder.java:122)
        at macromedia.abc.AbcParser.methodTrait(AbcParser.java:542)
        at macromedia.abc.AbcParser.methodTrait(AbcParser.java:516)
        at macromedia.abc.AbcParser.parseTraits(AbcParser.java:1130)
        at macromedia.abc.AbcParser.classTrait(AbcParser.java:1064)
        at macromedia.abc.AbcParser.parseTraits(AbcParser.java:1144)
        at macromedia.abc.AbcParser.parseScript(AbcParser.java:1197)
        at macromedia.abc.AbcParser.parseAbc(AbcParser.java:108)
        at flex2.compiler.abc.Compiler.parse1(Compiler.java:179)
        at flex2.compiler.API.parse1(API.java:2315)
        at flex2.compiler.API.parse1(API.java:2268)
        at flex2.compiler.API.batch2(API.java:369)
        at flex2.compiler.API.batch(API.java:1117)
        at flex2.compiler.API.compile(API.java:1290)
        at flex2.tools.oem.Application.compile(Application.java:1074)
        at flex2.tools.oem.Application.recompile(Application.java:1026)
        at flex2.tools.oem.Application.compile(Application.java:678)
        at flex2.tools.oem.Application.build(Application.java:461)
        at org.servebox.flex.mojo.base.AbstractFlexMakeMojo.invokeCompiler(AbstractFlexMakeMojo.java:931)
        at org.servebox.flex.mojo.MakeSWFMojo.invokeCompiler(MakeSWFMojo.java:105)
        at org.servebox.flex.mojo.base.AbstractFlexMakeMojo.compile(AbstractFlexMakeMojo.java:859)
        at org.servebox.flex.mojo.MakeSWFMojo.compile(MakeSWFMojo.java:113)
        at org.servebox.flex.mojo.base.AbstractFlexMojo.execute(AbstractFlexMojo.java:131)
        at org.servebox.flex.mojo.base.AbstractFlexMakeMojo.execute(AbstractFlexMakeMojo.java:852)
        at org.servebox.flex.mojo.MakeSWFMojo.execute(MakeSWFMojo.java:99)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)

     
    • Ghazi Triki

      Ghazi Triki - 2009-04-02

      Hello,
      Sometimes Maven will fail when running the test cases with this error. This means that Maven has run out of available system memory.

      To increase the memory available to Maven, the environment variable MAVEN_OPTS should be set to the value -Xmx512m -XX:MaxPermSize=128m, or more depending on the amount of memory you have available on your machine.

      To make this variable permanent on Windows, use the Control Panel -> System dialog. Select the Advanced tab and click Environment Variables. Under the System Variables table, click New. Type MAVEN_OPTS for the Variable name and -Xmx1024m -XX:MaxPermSize=128m for the Variable value.

      Thank you.
      Ghazi Triki

       
    • Marc

      Marc - 2009-04-07

      sorry, forgot mentioning the solution worked!

      thanks :-)

      Marc Baiges Camprubí

       

Log in to post a comment.