Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Hostile Activity (09/01/22)

Author Topic: 0.6.5a Extending Java's memory (Solution)  (Read 3832 times)

TartarusMkII

  • Commander
  • ***
  • Posts: 164
    • View Profile
    • Email
0.6.5a Extending Java's memory (Solution)
« on: November 02, 2014, 07:30:23 PM »

The method in this thread is old now, and Dark.Revenant's thread at http://fractalsoftworks.com/forum/index.php?topic=8726 is far superior. Please use that instead!


Hello,

During 0.6.2, I used a .batch file to run Star Sector using parameters found online to increase the amount of memory the game could use, preventing crashes where the heap would overflow.

But the .bat file no longer works with 0.6.5a, I suppose because certain file names were changed.

After testing Darloth's solution, I'll leave it here for others to use. I'd like to add that 1024m should easily be enough to allow the game to run properly, unless a mod you are using as an unfortunate leak of some kind.


Assuming a windows system, there's a file called "vmparams" in the starsector directory.

Editing that with any text editor (notepad will do but notepad++ will be better, wordpad would probably be fine too) and replacing this: "-Xms512m -Xmx512m" with this: "-Xms1024m -Xmx1024m", then save and use the launcher as usual.

You could go up to -Xms2048m -Xmx2048m if you have the ram, but in my experience this means the launcher won't start properly because Java fails to allocate all that memory.  To fix that, you may need to replace the JRE with a 64 bit version.  This basically involves downloading a recent 64bit JRE, and copying it over the one in the starsector/jre folder.  If that's too complex, try numbers in between 1024 and 2048 until something works for you.

Finally: Loading a save seems to take quite a bit more memory than actually playing the game, presumably because the game doesn't keep -everything- in memory all at the same time, but loading needs to do initial setup on everything at least once.


« Last Edit: December 09, 2014, 03:42:59 PM by TartarusMkII »
Logged

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2805
  • Your Friendly Forum Friend
    • View Profile
Re: 0.6.5a Extending Java's memory (Solution)
« Reply #1 on: November 03, 2014, 04:03:55 AM »

Hello,

During 0.6.2, I used a .batch file to run Star Sector using parameters found online to increase the amount of memory the game could use, preventing crashes where the heap would overflow.

But the .bat file no longer works with 0.6.5a, I suppose because certain file names were changed.

After testing Darloth's solution, I'll leave it here for others to use. I'd like to add that 1024m should easily be enough to allow the game to run properly, unless a mod you are using as an unfortunate leak of some kind.

Assuming a windows system, there's a file called "vmparams" in the starsector directory.

Editing that with any text editor (notepad will do but notepad++ will be better, wordpad would probably be fine too) and replacing this: "-Xms512m -Xmx512m" with this: "-Xms1024m -Xmx1024m", then save and use the launcher as usual.

You could go up to -Xms2048m -Xmx2048m if you have the ram, but in my experience this means the launcher won't start properly because Java fails to allocate all that memory.  To fix that, you may need to replace the JRE with a 64 bit version.  This basically involves downloading a recent 64bit JRE, and copying it over the one in the starsector/jre folder.  If that's too complex, try numbers in between 1024 and 2048 until something works for you.

Finally: Loading a save seems to take quite a bit more memory than actually playing the game, presumably because the game doesn't keep -everything- in memory all at the same time, but loading needs to do initial setup on everything at least once
My batch file works fine over here. Did you install on top of your old 62 folder or did you uninstall and reinstall?
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

TartarusMkII

  • Commander
  • ***
  • Posts: 164
    • View Profile
    • Email
Re: 0.6.5a Extending Java's memory (Solution)
« Reply #2 on: November 03, 2014, 04:26:39 AM »

I probably re-installed the new 6.5 without properly uninstalling the 6.2.
Logged

gofastskatkat

  • Ensign
  • *
  • Posts: 49
    • View Profile
    • Email
Re: 0.6.5a Extending Java's memory (Solution)
« Reply #3 on: December 09, 2014, 03:19:35 PM »

Hey, I've been having this prob, tried to up the amount of mem it can have but my windows OS wont let me change the folder (and files in the folder) to non-read-only. Im using win 8.1 so if anyone knows how to work 8.1 please help. Thanks
Logged

TartarusMkII

  • Commander
  • ***
  • Posts: 164
    • View Profile
    • Email
Re: 0.6.5a Extending Java's memory (Solution)
« Reply #4 on: December 09, 2014, 03:42:21 PM »

The method in this thread is old now, and Dark.Revenant's thread at http://fractalsoftworks.com/forum/index.php?topic=8726 is far superior. Please use that instead!
Logged

gofastskatkat

  • Ensign
  • *
  • Posts: 49
    • View Profile
    • Email
Re: 0.6.5a Extending Java's memory (Solution)
« Reply #5 on: December 09, 2014, 07:32:15 PM »

thanks
Logged