Flex Builder 3.0 Crash due to JVM Heap Space Error
So I was doing just find until I started adding all kinds of assets to my Flex Builder Project. After throwing in a bunch sound files, video files and numerous .png assets, Flex Builder app starting crashing during the build, complaining about the JVM Heap Space…or rather the lack of it.
I found this post which seemed to provide the solution: increase the size of the heap space through the Flex Builder’s .ini file.
However, don’t do this real fast like I did and then wonder why nothing happened: It turns out on my system that there were two directories for Flex Builder:
C:\Program Files\Adobe\Flex Builder 3\FlexBuilder.ini
and
C:\Program Files\Flex Builder 3\FlexBuilder.ini
I changed the .ini in the first one, which was NOT the right one. I only later realized that there was another installation directory. So, changing the second .ini file did the trick.
Update: if you try to increase your JVM heap space past a certain value, Flex Builder won’t start up. There’s a bug report on the Adobe bug tracking site, but it somehow got marked not a bug. Hmm…I still feel strongly about it being a bug since I can’t kick my heap space up to 1536MB.
In the meantime, I picked up a tip from Riyad on EclipseZone about setting -Xms and -Xmx to the same value to improve performance.
So, my .ini file now looks like
-vmargs
-Xms1024m
-Xmx1024m
-XX:MaxPermSize=256m
-XX:PermSize=64m
-Djava.net.preferIPv4Stack=true
but I still want it to look like
-vmargs
-Xms1536m
-Xmx1536m
-XX:MaxPermSize=256m
-XX:PermSize=64m
-Djava.net.preferIPv4Stack=true
Here’s somebody else wrestling with the same problem.
