Java Heap Space. Cannot Allocate more memory.

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'm having the java heap space problem when building my game in flash build.
    I didn't had that problem before, but I think as the game became bigger and bigger I can't export it as a whole anymore.
    on jvm.config, java.args is set like "java.args=-Xmx1024m"
    if I try to make it "-Xmx2048m" or anything bigger than that I get the following:

    Code
    Error occurred during initialization of VM
    Could not reserve enough space for 2097152KB object heap


    My computer has enough memory for that, I think it might be a limitation on flash exporter or 32-bit java? What should I do? How can I export my game again?

    *EDIT*
    Fixed the issue!

    The problem was caused because Flash Exporter(which uses flex) only allows 32-bit Java(JRE/JDK), therefore, it can't reserve more than 1024mb heap space for building swf. Sometimes in a big flash game you need more memory to build than that.
    The fix was a workaround to make Flash exporter accept 64-bit Java JRE/JDK, so you can reserve more memory and build your big-ass flash app.

    If anyone wants the fix, I can provide. Just ask =)

    Play The Return of Magic Online for FREE! A New Indie, old-school MMORPG made in MMF2: Please login to see this link.

    Edited 3 times, last by Mephistus: fixed the issue (October 25, 2017 at 11:47 PM).

  • Hey! How are you doing? I'm having the same issue but with the Android Exporter. How did you make the Flash exporter accept 64-bit Java JRE/JDK?

  • Hey! How are you doing? I'm having the same issue but with the Android Exporter. How did you make the Flash exporter accept 64-bit Java JRE/JDK?

    As far as I'm aware, you should be able to use a 64-bit Java JRE/JDK by going to Tools->Preferences and simply defining the path to it in the exporters section. While Fusion itself is 32-bit, I do not believe that stops it from using a 64-bit version of Java to compile for Android.

  • As far as I'm aware, you should be able to use a 64-bit Java JRE/JDK by going to Tools->Preferences and simply defining the path to it in the exporters section. While Fusion itself is 32-bit, I do not believe that stops it from using a 64-bit version of Java to compile for Android.

    I guess the problem was solved, given the date of the post you answered. :p For info the Android runtime now just needs the JDK installed by Android Studio in its own folder, you do not need to install any other JDK.

  • I guess the problem was solved, given the date of the post you answered. :p For info the Android runtime now just needs the JDK installed by Android Studio in its own folder, you do not need to install any other JDK.

    Thanks for the clarification Yves! I know this post is a bit old but I saw that no one answered Manuel's question about the Android exporter, so I figured that I'd leave an answer for anyone who may stumble across this thread with a similar question. Hope you are having a good day :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!