The 90% Memory Usage problem CURE :)

gruffman

  • *
  • Posts: 564
All credit to Satyre for this one;


From this thread. I thought the answer needed a higher profile spotlight put on it, I couldn't quite believe it when I found the answer just hidden away almost in a related thread.

I started a new project this morning with large actors and had serious constant 90% memory notices :( I have used this fix now for 8+ hours , and went from pre-fix having to restart every few minutes to not at all post-fix.

I was about to order £50 worth of extra memory when I came across this!!! 8) 8) 8)

I have an 8 GIG machine so I allocated 3 gig to Stencyl like this;

Quote
java -Xms256m -Xmx3000m -Djava.library.path=lib -jar sw.jar -Duser.home=%USERPROFILE%

To check what your system can handle, run ctrl+shift+esc to get up task manager, then click on Resource Manager, then Memory and all will become clear as you open and close Stencyl etc so you can see how much you can allocate :)

Stencyl is now running so much smoother in general as well :)

Again, all props to Satyre
Now available for all Android Devices - Happy Face Concentration
My Games To Date
Find A Face / Hero Of Oda / Snakes And Ladders
Hungry Monkey available at fgl.com for Sponsorship
My site - Gruffgames.com

xandramas

  • Posts: 411
This might fix the popup message but does that fix the underlying problem that the message is there for? Data loss etc?
Check my profile to test my games in development.
Asterite Saga: http://www.facebook.com/XGameLabs
Next Game in development.

captaincomic

  • *
  • Posts: 6108
xandramas, if you increase the memory for Java, the pop-up dialog could still appear, but it won't happen as often/soon. When you see the pop-up you still have to restart Stencyl to avoid data loss, but no pop-up means no risk of data loss.

It's also mentioned in Stencylpedia, btw, with solutions for all OSes: http://www.stencyl.com/help/view/ninety-percent-warning/

gruffman

  • *
  • Posts: 564
That stencylpedia refers to an exe being used from Stencyl 2 onwards. I had the issue with Stencyl 3 so whatever it does, it didn't work.
Now available for all Android Devices - Happy Face Concentration
My Games To Date
Find A Face / Hero Of Oda / Snakes And Ladders
Hungry Monkey available at fgl.com for Sponsorship
My site - Gruffgames.com

captaincomic

  • *
  • Posts: 6108
Ah, so the text file solution also works for Windows? I thought that was only for Linux/Mac.

Satyre

  • *
  • Posts: 270
Hi, I discovered that the method mentioned in the first post doesn't seem to work for windows 8.

I have found a solution for this:
1. From the Desktop, right-click My Computer and click Properties.
2. Click on Advanced System Settings.
3. In the System Properties window click the Environment Variables button.
4, Click New to add a new variable name and value.
5. For variable name enter   _JAVA_OPTIONS
6. For variable value enter    -Xmx1034m
7. Click ok and close the System Properties Tab.
8. Start any stencyl.exe file

The 1034 stands for 1GB. You can try to change this number to see if you can get more memory allocated.
This method also works for stencyl 2.2.

gamegirlxl

  • Posts: 713
I always ignored the memory warning...But I guess that this is better...

7akiller

  • Posts: 29
oooh , thanks dude ,i made this bat file and this message hadn't appeared until now , it works PERFECT

thanks satyre and gruffman :)

aips

  • Posts: 2
I have tried all of the things I have found as solution to this problem and nothing has helped... Only thing the different solutions does differently is when I get the warning, If I can open stuff to edit at all or not or if it also gives me the other warning?? But I still keep getting it and I have a dealine on monday :/ halp!

I've done that .bat script thingie, I've tried to download a proper Java version (for some reason it always instals 32 bit on my computer..), I've done the thing for windows 8 mentioned here..

RulezTeam

  • Posts: 317
 
xandramas, if you increase the memory for Java, the pop-up dialog could still appear, but it won't happen as often/soon. When you see the pop-up you still have to restart Stencyl to avoid data loss, but no pop-up means no risk of data loss.

It's also mentioned in Stencylpedia, btw, with solutions for all OSes: http://www.stencyl.com/help/view/ninety-percent-warning/

Just FYI,

if I use those .bat files, I haven't anymore the problem with memory, but I cannot create Android certificate and I cannot see fingerprint. So, if I want to create a certificate or look at fingerprint I must start stencyl with standard  .exe file. 
This is under Windows.


captaincomic

  • *
  • Posts: 6108
Okay, that's strange. Do you get any sort of error message when using the .bats to create the certificate? (Post logs please.)

RulezTeam

  • Posts: 317
No, I haven't any errors; it's only that if I look at fingerprint I can see only an empty space, and if I try to create a certificate, Stencyl tell me that it's all ok, but in my folder there isn't any certificate.
So, if I use the "normal" stencyl.exe I have the same message, but in my folder the certificate is created.