Skip to main content
Participating Frequently
June 2, 2013
Question

java.lang.OutOfMemoryError: Java heap space

  • June 2, 2013
  • 1 reply
  • 3074 views

Flash CS6 - Air sdk 3.7.1860 for iOS

Hardware/Software:

- Macbook Pro or MacMini i7 8 GB Ram Mac OS 10.8 or 10.6

- same hardware with Windows 7 64 bit java 1.6 or 1.7

When I try to package a project with about 300 swfs included (a single folder containing them) I obtain thi error alert from the java packager.

Exception in thread "Poller SunPKCS11-Darwin" Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

          at java.util.HashMap.<init>(HashMap.java:209)

          at java.util.HashSet.<init>(HashSet.java:86)

          at adobe.abc.Algorithms$ExprWorkQueue.add(Algorithms.java:489)

          at adobe.abc.Algorithms$ExprWorkQueue.addAll(Algorithms.java:524)

          at adobe.abc.GlobalOptimizer.sccp_eval(GlobalOptimizer.java:7062)

          at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:6019)

          at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4733)

          at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3615)

          at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2309)

          at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:532)

          at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:341)

          at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:611)

          at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:104)

java.lang.OutOfMemoryError: Java heap space

          at sun.security.pkcs11.wrapper.PKCS11.C_GetSlotInfo(Native Method)

          at sun.security.pkcs11.SunPKCS11.initToken(SunPKCS11.java:767)

          at sun.security.pkcs11.SunPKCS11.access$100(SunPKCS11.java:42)

          at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:700)

          at java.lang.Thread.run(Thread.java:680)

Compilation failed while executing : ADT

Tryed incresing java memory heap.

The problem does not occurr if include only a reduced number of swf (about 25).

Angelo

This topic has been closed for replies.

1 reply

Adobe Employee
June 3, 2013

How did you try to increse java heap memory?

Could you plese use command line to package your app - " java -xmx <some large value> -jar adt.jar ... "

Or edit the "adt" script at <sdk>/bin/adt to add the "-xmx <some large value>" to the java command.

Participating Frequently
June 3, 2013

I edited the user jvm.ini thie way:

-Djava.awt.headless=true

-Xmx1024M

So I could compile up to 42 swfs.

Than with -Xmx1512M I could not compile 43 swfs...it seems to not be affected from the modification.

If I use the command line could I obtaine a different result? I'll try.

Adobe Employee
June 3, 2013

Could you please try updating the adt script as mentioned above.

I guess updating the jvm.ini won't help.