Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
Publish Error: Could not reserve enough space for object heap
  • Hi
    I tried to publish android apk and got "Could not reserve enough space for object heap" error message on windows 8.1. 

    I tried to fix it by adding environment variable "_JAVA_OPTIONS: -Xmx512M" but it wasn't successful and I got another error. Last logged message is:
    [java] Picked up JAVA OPTIONS: -Xmx512M

    I'm using GBS v0.9.8

    Any help is appreciated.

  • 6 Comments sorted by
  • @Saman this is probably because the 32bit version of Java bundled with GBs (Windows) is not sufficient on your 64 bit machine. So install the 64 bit Java runtime on your machine and tell GBs where to find it by editing the apps compile.bat file in your machine's storage location.

    Here is the location of the file C:\Users\[USERNAME]\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin\compile.bat

    Find the line that looks like this: set PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin

    Right before that line add the location of your java runtime root folder like this: 

    set JAVA_HOME=[JAVA LOCATION]

    That should fix it. This will not be necessary in the new build getting ready to be released because we will add an option in the app settings to pass your own location to the java runtime.
  • I followed your direction and now I see another error. Here is the console log:


    PublishGameCommand - Print Compiler Exec - C:\Windows\System32\cmd.exe
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>setlocal disabledelayedexpansion 
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>FOR /F "tokens=1* delims==" %i IN (compiler.properties) DO set "%i=%j" 
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>set "COMPILER_HOME=C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win" 
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>set "ANT_HOME=C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Shared\bin\ant" 
    PublishGameCommand - 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>set "JAVA_HOME=C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin\java_jdk" 
    PublishGameCommand - 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>set JAVA_HOME=C:\Program Files\Java\jre7 
    PublishGameCommand - 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>set PATH=C:\Program Files (x86)\PHP\v5.4;C:\WINDOWS\system32\inetsrv;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\Java\jdk1.8.0_05\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Android\android-studio\sdk\tools\;C:\Program Files (x86)\apache-ant-1.9.4/bin;C:\Program Files (x86)\Android\sdk\platform-tools;C:\Ruby200\bin;C:\Users\Saman\AppData\Roaming\npm\;C:\Program Files\Java\jdk1.8.0_05\bin;C:\Program Files\nodejs\;C:\Users\Saman\AppData\Roaming\npm;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Shared\bin\ant\bin;C:\Program Files\Java\jre7\bin 
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>set ANT_OPTS=-Xmx1024m 
    PublishGameCommand - 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>set JAVA_OPTS=-Xmx1024m 
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin>ant -buildfile ..\Android\bin\build.xml publish 
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | Buildfile: C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\Android\bin\build.xml
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - publish:
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - build_dir_check:
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - cleanup:
    PublishGameCommand -      [echo] GBS: Removing Build Dir...
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - createdirs:
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [echo] GBS: Creating Build Dir...
    PublishGameCommand - 
    PublishGameCommand - buildswfassets:
    PublishGameCommand -      [echo] GBS: Building Any SWF Assets...
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - copyfiles:
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [echo] GBS: Copying Source Files To Build Dir...
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [copy] Copying 16 files to C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\data\Examples\FiringTurretDemo\build
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [copy] Copied 7 empty directories to 1 empty directory under C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\data\Examples\FiringTurretDemo\build
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [copy] Copying 2 files to C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\data\Examples\FiringTurretDemo\build\icons
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [echo] GBS: Copying Splash Screen To Build Dir...
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [copy] Copying 1 file to C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\data\Examples\FiringTurretDemo\build
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [echo] GBS: Copied Source Files To Build Dir.
    PublishGameCommand - 
    PublishGameCommand - compile:
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [java] Loading configuration: C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\compiler\Win\bin\air_sdk\frameworks\airmobile-config.xml
    PublishGameCommand -      [java] 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [java] 3693656 bytes written to C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\data\Examples\FiringTurretDemo\build\FiringTurretDemo.swf in 7.872 seconds
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [echo] GBS: Compile Finished
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - createcert:
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand - package:
    PublishGameCommand -      [echo] GBS: Packaging project to Android .APK binary
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [java] no such file C:\Users\Saman\AppData\Roaming\GameBuilderStudio\Local Store\data\Examples\FiringTurretDemo\resources\${EXTERNAL_FILE_INCLUDES}
    PublishGameCommand -      [java] usage:
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand -      [java]   adt -checkstore SIGNING_OPTIONS
    PublishGameCommand -      [java]   adt -certificate -cn <name> ( -ou <org-unit> )? ( -o <org-name> )? ( -c <country> )? ( -validityPeriod <years> )? ( 1024-RSA | 2048-RSA ) <pfx-file> <password>
    PublishGameCommand -      [java]   adt -help
    PublishGameCommand -      [java]   adt -migrate SIGNING_OPTIONS ( <air-file-in> | <airn-file-in> ) <output-file>
    PublishGameCommand -      [java]   adt -package SIGNING_OPTIONS ( -target air )? <output-package> ( <app-desc> FILE_OPTIONS | <input-package> )
    PublishGameCommand -      [java]   adt -package SIGNING_OPTIONS -target airn <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )
    PublishGameCommand -      [java]   adt -package -target ( apk | apk-debug | apk-emulator | apk-captive-runtime ) ( CONNECT_OPTIONS? | LISTEN_OPTIONS? ) ( -airDownloadURL <url> )? ( ARCH_OPTIONS )? SIGNING_OPTIONS <output-package> ( <app-desc> PLATFORM-SDK-OPTION? FILE-AND-PATH-OPTIONS | <input-package> PLATFORM-SDK-OPTION? )
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [java]   adt -package -target ( ipa-test | ipa-debug | ipa-app-store | ipa-ad-hoc | ipa-test-interpreter | ipa-debug-interpreter | ipa-test-interpreter-simulator | ipa-debug-interpreter-simulator ) ( CONNECT_OPTIONS? | LISTEN_OPTIONS? ) ( -sampler )? ANE_LINK_OPTIONS? AOT_MODE_OPTIONS? SIGNING_OPTIONS <output-package> ( <app-desc> PLATFORM-SDK-OPTION? FILE-AND-PATH-OPTIONS | <input-package> PLATFORM-SDK-OPTION? )
    PublishGameCommand -      [java]   adt -package SIGNING_OPTIONS? -target native SIGNING_OPTIONS? <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )
    PublishGameCommand -      [java]   adt -package SIGNING_OPTIONS? -migrate SIGNING_OPTIONS -target native SIGNING_OPTIONS? <output-package> <app-desc> FILE_OPTIONS PATH-OPTION
    PublishGameCommand -      [java]   adt -package SIGNING_OPTIONS? -target bundle SIGNING_OPTIONS? <output-package> ( <app-desc> FILE-AND-PATH-OPTIONS | <input-package> )
    PublishGameCommand -      [java]   adt -package SIGNING_OPTIONS? -target ane <output-package> <ext-desc> ANE_OPTIONS
    PublishGameCommand -      [java]   adt -prepare <airi-file> <app-desc> FILE_AND_PATH_OPTIONS
    PublishGameCommand -      [java]   adt -sign SIGNING_OPTIONS ( -target ( air | airn | ane ) )? ( <airi-file> | <unsigned-ane-file> ) <output-file>
    PublishGameCommand -      [java]   adt -devices          PLATFORM-OPTION PLATFORM-SDK-OPTION? 
    PublishGameCommand -      [java]   adt -installRuntime   PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? ( -package <apk-file> )?
    PublishGameCommand -      [java]   adt -installApp       PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -package <apk-file | ipa-file>
    PublishGameCommand -      [java]   adt -uninstallRuntime PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION?
    PublishGameCommand -      [java]   adt -uninstallApp     PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -appid <app-id>
    PublishGameCommand -      [java]   adt -launchApp        { PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? ( -debuggerPort port )? -appid <app-id> }
    PublishGameCommand -      [java]   adt -runtimeVersion   PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION?
    PublishGameCommand -      [java]   adt -appVersion       PLATFORM-OPTION PLATFORM-SDK-OPTION? DEVICE-OPTION? -appid <app-id>
    PublishGameCommand -      [java]   adt -version
    PublishGameCommand -      [java] 
    PublishGameCommand -      [java] SIGNING_OPTIONS      : -storetype <type> ( -keystore <store> )? ( -storepass <pass> )? ( -alias <aliasName> )? ( -keypass <pass> )? ( -providerName <name> )? ( -tsa <url> )? ( -provisioning-profile <profile> )?
    PublishGameCommand -      [java] FILE_OPTIONS         : <fileOrDir>* ( ( -C <dir> <fileOrDir>+ ) | ( -e <file> <path> ) )*
    PublishGameCommand -      [java] ARCH_OPTIONS        : -arch (armv7 | x86)
    PublishGameCommand -      [java] CONNECT_OPTIONS      : -connect <host>
    PublishGameCommand -      [java] LISTEN_OPTIONS       : -listen <port>
    PublishGameCommand -      [java] ANE_LINK_OPTIONS     : -hideAneLibSymbols ( yes | no )
    PublishGameCommand - 
    PublishGameCommand - Compile Game Process |      [java] ANE_OPTIONS          : -swc <swc> ( -platform <name> (-platformoptions <file>)? <fileOrDir>* ( -C <dir> <fileOrDir>+ )* )*
    PublishGameCommand -      [java] FILE-AND-PATH-OPTIONS: ( PATH-OPTION | FILE-OPTIONS ) FILE-AND-PATH-OPTIONS?
    PublishGameCommand -      [java] PATH-OPTION          : -extdir <dir>
    PublishGameCommand -      [java] PLATFORM-OPTION      : -platform (android | ios)
    PublishGameCommand -      [java] PLATFORM-SDK-OPTION  : -platformsdk <platform-sdk-home-dir>
    PublishGameCommand -      [java] DEVICE-OPTION        : -device ( deviceID | ios-simulator )
    PublishGameCommand -      [java] AOT_MODE_OPTIONS     : -useLegacyAOT ( yes | no )
    PublishGameCommand - 

  • I have the same error, but it worked perfectly before. I updated to version 0.9.8 and got the error while publishing for android. Then I downgraded and still the same error, on all my old projects too.
    And the error:
    PublishGameCommand -     [mxmlc] Error: configuration variable 'output' value contains unknown token 'SWF_ASSET_LIST'.
    PublishGameCommand -     [mxmlc] 
    PublishGameCommand - Compile Game Process | 
    PublishGameCommand -     [mxmlc] 
    PublishGameCommand -     [mxmlc] command line
    PublishGameCommand -     [mxmlc] Error: configuration variable 'file-specs' value contains unknown token 'SWF_ASSET_LIST'.
    PublishGameCommand -     [mxmlc] 
    PublishGameCommand -     [mxmlc] 
    PublishGameCommand -     [mxmlc] Picked up _JAVA_OPTIONS: -Xmx512M
  • After restarting it compiles all right again
  • @Saman, @kikubu sorry about that, try the new RC build 568
  • RC build 568 is working fine.
    Also I had to set the JAVA_HOME to jre 64bit as you said before.
    Thanks

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion