13,775

Views

Beginner

Level

6

Comments

The 90% Memory Warning

by Jon (Updated on 2014-01-30)


Why does this happen?

Java operates by allocating a chunk of memory for the application to use before the app launches - it can't be set at runtime.

There is an upper limit to this memory. If you go too high, the application stops operating properly.

So why not just set the limit very high? It causes weaker machines with less memory to fail to open the app at all.

Although we are working to reduce memory usage and plug leaks, there are large games for which having the higher memory usage will be useful.

Common Misconception: The 90% memory warning has nothing to do with how much RAM your computer has. You could have 128 GB of RAM and still hit this since Java's upper cap sits around 4 GB and on some systems, may be as low as 2 GB.

 

How to Safely Suppress This Warning (Windows)

For Windows users, this alternate EXE launcher should do the trick. This started shipping by default with Stencyl 2.0 and later.

Download It

If that doesn't work, you can make a batch script (make a text file, save it with a .bat extension, stick it in the Stencyl directory) with the following, changing the 1024 to something bigger until it works for you.

java -Xms64m -Xmx1024m -jar sw.jar

 

How to Safely Suppress This Warning (Linux)

1) Edit the Stencyl shell script.

2) Change the thing that looks like "-Xmx1024m" to a higher number - the 1024 represents MB. (In older versions, it may be 512)

 

How to Safely Suppress This Warning (Mac)

1) Right-click the Stencyl.app bundle and "Show Package Contents"

2) Edit Contents/Info.plist.

3) Expand the Java node. You should see something like this.

Change the thing that looks like "-Xmx1536m" to a higher number - the 1536 represents MB. (In older versions, it may be 512 or 1024)

 

Need more than 4 GB?

You'll need to install a 64-bit version of Java. This takes effort but has been reported to work.

http://www.minecraftforum.net/topic/57538-mac-guide-106-how-to-make-minecraftapp-use-64bit-java/

 

Disclaimer: All articles are geared towards Stencyl 3.0 and above. Use comments to provide feedback and point out issues with the article (typo, wrong info, etc.). If you're seeking help for your game, please ask a question on the forums. Thanks!

6 Comments

mvmsaikrishna
Same problem here, if I set a value >2048 stencyl wont open on my mac.
0 4 months, 1 week ago
Jon
I've stuck in a few more solutions that were reported to be successful.
0 7 months, 4 weeks ago
Mesket
I have 2.2 but still have this problem very often... usually every 15 to 30 mins
0 1 year, 6 months ago
Vectrex71
@P01

Same problem here :-(

It seems like it. When I set it to something higher on my Mac then Stencyl won't open.


0 1 year, 6 months ago
P01
It seems like it. When I set it to something higher on my Mac then Stencyl won't open.
1 1 year, 11 months ago
Cheyenne
what is the limit ? 2048 Mb ?
0 1 year, 11 months ago

Sign In to Comment