Out of memory yet again B10814

Galdon2004

  • *
  • Posts: 313
So, I just got a new computer so I'm having to get set back up again. This new version of the stencyl beta though has abandoned the batch file that lets you access more memory, causing the game to fail when hitting 8gb memory again. The new batch file is far more complicated and seems to have a "max memory" line similar to the line that normally increases the memory limit, but it does not work; replacing this line with the line from the old batch file does not work either.

I cannot work until this is solved, so is anyone able to help with this issue?

Luyren

  • *
  • Posts: 2747
Quote
If you're using the latest private build, you don't want to use any of the old batch files
The default memory limit is 4GB. If you want more than that, you can edit the
Code: [Select]
Stencyl-windows.bat file, and find
Code: [Select]
set "_MAX_MEM_=4096"Change that to however many MB you want.
From a discussion in the Discord server on the subject.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
Twitter

Justin

  • *
  • Posts: 4693
Here's a link to the conversation.

https://discord.com/channels/209323692205932544/227870283749523459/892612910872944642

To sum up:

1. Changing the amount of memory set in the batch file (as Luyren posted) works fine, and wasn't the issue here.

2. The only problem building games was when publishing HTML5 games, because that starts a new JVM to run the closure compiler, but isn't given a larger heap. This can be fixed by making a change to lime. Lime is found by default at %LocalAppData%\Stencyl\libs\haxelib\Stencyl\lime\<lime-version>. The file you need to change is src\lime\tools\HTML5Helper.hx.

Code: [Select]
var args = [
"-Dapple.awt.UIElement=true",
"-Xmx4096m", <--- add this line and set the number, again in MB
"-jar",
ConfigHelper.getConfigValue("PATH_CLOSURE_COMPILER"),
"--strict_mode_input",
"false",
"--js",
sourceFile,
"--js_output_file",
tempFile
];

« Last Edit: September 29, 2021, 05:40:49 pm by Justin »
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)