• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Flash Pro CS6 - not enough JVM memory - change 128 to 256, flash doesn't start.

Explorer ,
Jun 20, 2012 Jun 20, 2012

Copy link to clipboard

Copied

Hi,

working on very large projects, I often get the "flash ran out of memory for the jvm" error.

Restarting flash does the trick for another couple of hours, until I get that error again.

It opens the jvm.ini file to let me increase Xmx memory value.

I change it from -Xmx128m to -Xmx256m

I restart flash, get the error: "Error initializing Java Runtime environment. You may need to reinstall Flash"

I change it back to -Xmx128m, and flash starts again.

But obviously, I again get the "not enough memory" error.

Am I doing something wrong?

Also,

after installing Flash Pro CS6, previously installed Flash Pro CS5.5 does not start, gives me the JVM initialization error all the time, regardless of which Xmx value I put for CS5.5

Views

24.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2012 Jun 21, 2012

Copy link to clipboard

Copied

I have exactly the same problem but my flash project is absolutely tiny. (15 lines of AS3 code!) I can compile once - then have to start flash again to compile again. Totally unworkable.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2012 Aug 02, 2012

Copy link to clipboard

Copied

I am seeing the same problem with any size file. A completely empty AS3 document will compile and run, but if I add even one space to the timeline actionscript I get the JVM out of memory error!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 03, 2012 Aug 03, 2012

Copy link to clipboard

Copied

Hi Joe/MochiSteve,

Could you please share a file or two with which you are facing this issiue. Would like to take a look at it to get more details.

MochiSteve: could you please share your machine config details?

Thanks!

Mohan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2012 Jun 21, 2012

Copy link to clipboard

Copied

I have a similar but slightly different problem.

I have a large flash project which compiles ok in Flash CS5.5 as long as I change the -Xmx128m to -Xmx300m

I I try and compile it in Flash CS6 then any value for Xmx over 178 causes the "Error initializing Java Runtime environment. You may need to reinstall Flash". The project won't compile.

I'm running Windows XP with 4GB of memory.

My guess is that Flash has a fixed amount of memory that it is allowed to use for the program, your fla file and the compiling process. This amount is fixed regardless of the computer's memory.

CS6 is a larger program than CS5.5 so leaves less for the the fla file and compiler. Hence, large files which compiled on CS5.5 won't compile on CS6

Any solutions would be very wellcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2012 Jun 21, 2012

Copy link to clipboard

Copied

Hi SeaBream - I got that error as well but only if I bump up the -Xmx128m too much. For me reducing it back to someting  < 300 made it work again.

I would appreciate if someone from Adobe could comment on this though because at the moment - I've got expensive subscription to Creative Cloud and I can't use it because this issue basically stops me developing anything!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2012 Jun 21, 2012

Copy link to clipboard

Copied

I can't see how this makes ANY sence but I just moved files associated with my test project away from my [USER] home directory to a different folder and the error disappeared. I've been messing around with this for a few hours but I don't believe I changed anything which could have affected it.

Really, Really weird but happy that it works!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2012 Jun 21, 2012

Copy link to clipboard

Copied

Me too I have XP with 3Gb ram.

Even if I put it to 129 it gives me that error.

Funny thing is, after I installed CS6, my installed CS5.5 gives always that error, no matter what I change. No way to make 5.5 start again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 22, 2012 Jun 22, 2012

Copy link to clipboard

Copied

Hi Filippo,

Seems like this error appears for various reasons, I have listed down some of them that I'm aware of

1. May be due to the version of Java Runtime installed on the system. Few versions of Java runtime require admin privileges for it to work flawlessly due to a bug as discussed here http://www.java.com/en/download/help/javacpl.xml

Solution: Try uninstall the current Java runtime version and probably install the latest version or install an older version than that of the existing one

2. May be due to Flex-jars in CLASSPATH environmental variable

Solution: http://helpx.adobe.com/flash/kb/error-error-initializing-java-runtime.html

3. May be due to running Flash from non-administrator accounts

Solution: Try install/run flash from administrator account

Thanks!

Mohan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 22, 2012 Jun 22, 2012

Copy link to clipboard

Copied

Hi Mohan,

Thanks for replying to this. I have two Windows XP PCs, both with Flash CS6. I have a large project which will compile on one but not on the other.

Both PCs have 4GB RAM and Java 6.

Both are running as administrator.

On the PC which works I have to increase the -Xmx value to 300.

On the PC which doesn't work the JVM won't initialise if I put the value of -Xmx to greater than 178.

I've looked in the CLASSPATH and there isn't anything related to Flex.

This is a critical error for us because we can't compile out main project.

Any suggestions or help would be great.

Cheers

Joe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 27, 2012 Jun 27, 2012

Copy link to clipboard

Copied

Hi Joe,

Since you have mentioned you have the same configurations in both the cases(PC, RAM, XP, AdminUser, JavaRuntimeVersion, CS6 and a same test file) but one is working and the other is not, seems like neither this is an issue with Flash CS6 nor with JavaRuntime in your case. Is there any other vital difference you could observe between your PC's?

Thanks!

Mohan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

Hi Mohan,

>>

neither this is an issue with Flash CS6

>>

The project compiled on both PCs with Flash CS5.5 but doesn't work on one with Flash CS6. This is a Flash CS6 problem. I will not be upgrading to Flash CS6 until it is fixed.

>>

Is there any other vital difference you could observe between your PC's?

>>

No, otherwise I would have said. I was hoping that you'd ask me to check something else.

Joe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 28, 2013 Mar 28, 2013

Copy link to clipboard

Copied

Hi Mohan,

My machine has 32GB of RAM.  I can't believe my Flash CS6 is giving me this error.

My jvm.ini looks like this:

-Djava.awt.headless=true

-Xmx128m

I wish Adobe would provide a clear solution for this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 07, 2013 Apr 07, 2013

Copy link to clipboard

Copied

I'm having this same issue. Running Flash Pro CS6 on a Win7 64-bit OS, 8gb of RAM and an SSD hard drive. Especially given Tatanium's 32gb of RAM, I think we can clearly eliminate "tech specs" from the reasons causing this.

If I had to guess it might be some directory reading issue, since moving to a new folder often clears up the problem. This is a really hacky solution though, and only works sporadically. Plus it's a huge pain to have to move the source .fla every time I want to compile.


Specifically, I'm having my problem exporting a .swc containing a whole bunch of .wav files. It exports to about 30mb, so not wildly huge but decent enough.

UPDATE/FIX: I changed -Xmx128m to -Xmx256m in jvm.ini and it seems to have worked for me, after restarting Flash. Read above that it didn't work so I didn't try it earlier, I guess it's very machine-specific. My issue is solved for the time being, but this still seems to be a bit of a problem - good luck to everyone else/Adobe!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 15, 2012 Nov 15, 2012

Copy link to clipboard

Copied

I just installed CS6 and had the same problem.  My solution is quite simple.  After I encoutered the problem, I re-installed java as administrator by clicking the installer.  But I doubt that is necessary. 

Then I ran Flash CS6 as the administrator by right clicking the shortcut.  That worked. 

So I have set up the shortcut to run as the administrator.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2014 Nov 03, 2014

Copy link to clipboard

Copied

I was having these issues as well all of a sudden in Flash CC 2014. With my AIR-iOS project using Starling. My jvm.ini file had 256 in it by default to I changed that to 512 which caused all sorts of random errors in my Assets class where I embed all my assets using the [Embed tag.

So I uninstalled Flash and reinstalled it again. Opened my FLA and Flash told me I should use AIR 14.0 for iOS as my previous Target version was too old. Right now I can compile my FLA properly again without the Java error. So... not 100% if it was the re-install or switching to AIR 14.0 for iOS as Target but I have been compiling the FLA 7 times now without restarting Flash. Fingers crossed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 03, 2014 Nov 03, 2014

Copy link to clipboard

Copied

back to square one again. The error message just popped up. So annoying.

update:

I removed some of the images I embed using the '[Embed tag'. And now it publishes again without the error. Weird because the published swf is only 1.8MB. Nothing crazy. So the problem seems related to embedding images using the [Embed tag...


update 2 / FIX:

Instead of using the embed tag to embed images I now have an 'assets' folder that I add to the AIR project (publish settings) that contains my images. Then I load the various images using the Loader. After an image is loaded I convert it to a Texture to use in Starling like so:


var bitmap:Bitmap = new Bitmap(new BitmapData(currentBigTextureLoader.width, currentBigTextureLoader.height, true, 0x00000000));

bitmap.bitmapData.draw(currentBigTextureLoader);

bigTextures[aBigTexturesToLoad[nCurrentBigTextureToLoad]] = Texture.fromBitmap(bitmap);

You can then use these Textures to display an image in Starling like so:

var base:Image = new Image(bigTextures["CollectionBase"]);

Bit of a workaround but al least I don't get the Java Error anymore

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 30, 2019 Sep 30, 2019

Copy link to clipboard

Copied

LATEST

How to fix it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines