Java Heap Space strikes again


(lordmagnet) #1

Hello all, this is my first time posting on the new forums. Anyways, I have received this “Java Heap Space” error before in FlashDevelop and needed to set jvm.config to “java.args=-Xmx1024m”. Now this error is back and no value I have tried is letting me compile (2048m, 2g) , and now I am stuck.

Has anyone else run into this issue? Can anyone point me in the right direction? Thanks in advance.

Update: I am able to compile up to and including setting to Xmx1272m. Setting any amount higher than that yields:

“INITIALIZING: Error occurred during initialization of VMCould not reserve enough Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Build halted with errors (fcsh).”

So I can compile for now, but I know I will hit another road block with this. Anyone have an idea of how to increase this, and allow java to reserve more memory? I have 16 gb of ram in my system so it shouldn’t be this limiting. A possible limitation in 32bit java?


Java Heap Space with Code Embedding
Parsing TILED XML in flashpunk, can't seem to add bitmaps and shapes?
(Enzo M) #2

Hello,

I got the same problem : I upped Xmx’s settings and it worked. But I had 500mb of memory while running the program. Now that I added a new sprite, my memory went wild and a new error appeared. As LordMagnet…

Does anyone got an idea ?


(rostok) #3

this is not true solution, more like a workaround. but you should try replacing embedded assets with ones that are dynamically loaded. this involves using flash.net.URLLoader. it really speeds up build times and conserves memory. unfortunately if you need one solid swf you will have to crack this one in another way. as for details i use my custom code but there is FLAKit and its library management made by @jacobalbano


(lordmagnet) #4

Rostok, thanks for the help. It’s definitely a push in the right direction.