Out of memory yet again B10814


  • *
  • Posts: 318
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?


  • *
  • Posts: 2792
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.


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


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 = [
"-Xmx4096m", <--- add this line and set the number, again in MB

« 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)