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.
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.
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.