1
Bug Reports & Support (modded) / OutOfMemoryError: PermGen space
« on: July 05, 2022, 07:15:26 PM »
I am putting this here to help anyone getting this error "[Thread-3] ERROR com.fs.starfarer.combat.CombatMain - java.lang.OutOfMemoryError: PermGen space"
If you run too many mods, odds are you have the same mod with memory leak as me which i couldn't single-out, It will cause you to crash every ~15-20 mins consistently.
1- Open your game folder
2- Right click on VMparams and select "edit with notepad" or any other text editor
3- Add the following line after "java.exe": "-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled" make sure there is 1 and only 1 space before and after the added text.
This will force the engine to clear classes that are "no longer in use" and limit the size allocated to them preventing PemGen from leaking into memory space allocated for the game.
If you run too many mods, odds are you have the same mod with memory leak as me which i couldn't single-out, It will cause you to crash every ~15-20 mins consistently.
1- Open your game folder
2- Right click on VMparams and select "edit with notepad" or any other text editor
3- Add the following line after "java.exe": "-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled" make sure there is 1 and only 1 space before and after the added text.
This will force the engine to clear classes that are "no longer in use" and limit the size allocated to them preventing PemGen from leaking into memory space allocated for the game.