Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Memory Leak (modded game)  (Read 11293 times)

ihugyourmom

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Memory Leak (modded game)
« on: August 14, 2022, 12:41:02 PM »

Having to restart the game every 20min or so, depending on how many reloads i do.

Anyone else having this issue? i removed some mods and it was working fine for a while, but now its even worse.
mem and vram aint maxed out, so its not saturation from the pagefile.

Dont know what to do, reloading every 20min is getting really annoying now. I am on cycle 215, and i noticed that it gets worse the longer i play for (cycle count).

anyone have a clue?

Mods that are enabled atm. All that can are updated, some "yellow" ones which still aint R6 but .95 valid.
Code
{"enabledMods": [
  "pantera_ANewLevel40",
  "Adjusted Sector",
  "lw_autosave",
  "blackrock_driveyards",
  "su_Concord",
  "lw_console",
  "diyplanets",
  "DetailedCombatResults",
  "dynamictariffs",
  "GrandColonies",
  "hte",
  "IndEvo",
  "Imperium",
  "lw_lazylib",
  "exshippack",
  "MagicLib",
  "su_CarrierHullmod",
  "nexerelin",
  "officerExtension",
  "ORA",
  "planet_search",
  "tahlan_scalartech",
  "scan_those_gates",
  "speedUp",
  "stelnet",
  "Terraforming & Station Construction",
  "US",
  "lw_version_checker",
  "whichmod",
  "shaderLib"
]}

what version checker shows:
https://imgur.com/a/OG5VcrD
« Last Edit: August 14, 2022, 12:48:34 PM by ihugyourmom »
Logged

Hatter

  • Commander
  • ***
  • Posts: 226
    • View Profile
Re: Memory Leak (modded game)
« Reply #1 on: August 14, 2022, 06:28:23 PM »

Consider bringing this to Bugs & Support (Modded) https://fractalsoftworks.com/forum/index.php?board=14.0
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 713
    • View Profile
Re: Memory Leak (modded game)
« Reply #2 on: August 14, 2022, 11:55:25 PM »

you should check out the `G1GC VMParam Collection` on the Starsector Discord which is basically:

    Use JRE 8

    Use a much better garbage collector than the Java 7 one

    You might have to force application scaling to get it to look right

I've been doing this and it's made all of my issues with performance and the usual 50+ mods go away.

ihugyourmom

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Memory Leak (modded game)
« Reply #3 on: August 15, 2022, 04:31:34 AM »

you should check out the `G1GC VMParam Collection` on the Starsector Discord which is basically:

    Use JRE 8

    Use a much better garbage collector than the Java 7 one

    You might have to force application scaling to get it to look right

I've been doing this and it's made all of my issues with performance and the usual 50+ mods go away.

I am using:
- java 8
- 8gb vmparams file
- I have 32gb ram on this rig.

Changing the ram allocation, doesnt seem to change anything. My understanding is, it an initial allocation, once launched it will pull whatever ram it needs (if available).

I can reload once! and i get a memory leak, plenty of ram/vram left.

I am in a nebula system, might be related not sure. But at this point, the save is unplayable, as i need to restart constantly.

memory link screen shot:
https://imgur.com/a/AUPx8uq

edit:
Location have no impact on the memory leak it seems, happens in hyper and in systems alike.
« Last Edit: August 15, 2022, 05:55:25 AM by ihugyourmom »
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: Memory Leak (modded game)
« Reply #4 on: August 15, 2022, 07:41:45 AM »

If there's just the one extra campaign copy it shouldn't be causing such a large framerate drop with such a short modlist. Also not sure what to make of the 61% idle number.

If you haven't already tried lowering the RAM allocation (6 GB or lower is best), do so; 8 GB isn't recommended without the G1GC vmparams.
Might also be worth getting the said G1GC files from the Discord server.

Oh, here's a thing that may be useful: enter bugreport in console and paste the output (it gets copied to clipboard).
Logged

berkenkamp25

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: Memory Leak (modded game)
« Reply #5 on: August 17, 2022, 01:52:46 AM »

Hello, I was having the same trouble and I just followed Wisp's instruction. Set vmparams to 8GB.

It's caused by using mods in general, regardless of your PC specs.
The only known fix is switching to JRE 8.

Copy/pasting from Discord, sorry if formatting is bad:


Mini-guide: Switching to Java 8 to prevent the post-battle slowdown
Not officially supported, may cause unrelated issues, do at your own risk and please report back if you do notice it causing problems.

Symptoms
- After some time playing and immediately after a battle, the game FPS will plummet (eg from 60 to 15-25) and usually only go back to normal after a game restart.
- Saving/loading takes 5x longer than usual.
- Using at least one mod (that adds new sprites? incl. GraphicsLib).

Fix (slow down and read this part carefully)
1. Go to your starsector install and rename the jre folder to jre7.
2. Download either of the following (both are the same JRE 8 v271) (Mac/Linux users look below for download link):
    - (72 MB .zip) https://drive.google.com/file/d/1CGRtnv5hIGCtcdlvZXFO0F58VXqYUo6x/view?usp=sharing
    - (48 MB .7z) https://drive.google.com/file/d/155Lk0ml9AUGp5NwtTZGpdu7e7Ehdyeth/view?usp=sharing
3. Extract that into your game folder so you have a folder named jre. You'll now have both jre (with java 8 ) and jre7.
4. Make sure that your starsector/starsector-core/data/config/settings.json allowAnyJavaVersion is set to true. Then launch the game as normal.


Potential issues
- Game+launcher is zoomed in/off-center.
    Fix: Right-click Starsector, Properties, Compatibility, Change high DPI settings, tick checkbox for "Override...Scaling performed by Application"
    Thanks to Normal Dude for the fix.

We have the same setup, my GFX is 6GB.

I am using a few more mods and I haven't seen it readout more than 2.7GB on the console.

Maybe it is one of the mods you're using?
Anyway, this helped me so maybe it could help you.

I did remove Blackrock Drive Yards because it lists dependencies in the wrong field in the mod_info... what else could be wrong
I recommend removing any mod that can't get something like dependencies in the right field.

enabled mods
{"enabledMods": [
  "PAGSM",
  "yunrutechmining",
  "advanced_gunnery_control_dbeaa06e",
  "A_S-F",
  "apex_design",
  "raccoonarms",
  "better_deserving_smods",
  "BSC",
  "bountiesexpanded",
  "bricky",
  "HMI_brighton",
  "CWSP",
  "CaptainsLog",
  "CFT",
  "Csp",
  "CSP",
  "chatter",
  "timid_commissioned_hull_mods",
  "lw_console",
  "istl_dassaultmikoyan",
  "DetailedCombatResults",
  "diableavionics",
  "Diktat Enhancement",
  "domhist",
  "edshipyard",
  "seven_nexus",
  "Everybody loves KoC",
  "extra_system_reloaded",
  "XLU",
  "HHE",
  "fleethistory",
  "GachaSMods",
  "GrandColonies",
  "GMDA",
  "HMI_SV",
  "HMI",
  "hte",
  "HIVER",
  "IndEvo",
  "Interstellar Federation Refurbished -unbalanced-",
  "Imperium",
  "timid_xiv",
  "jaa",
  "JYD",
  "kyeltziv",
  "LTA",
  "lw_lazylib",
  "ArkLeg",
  "luddenhance",
  "exshippack",
  "MagicLib",
  "Mayasuran Navy",
  "missingships",
  "more_hullmods",
  "Musashimanufactor",
  "ness_saw",
  "nexerelin",
  "oas",
  "ORA",
  "progressiveSMods",
  "roider",
  "rotcesrats",
  "tahlan_scalartech",
  "SCY",
  "SEEKER",
  "swp",
  "mayu_specialupgrades",
  "speedUp",
  "sun_starship_legends",
  "stelnet",
  "StopGapMeasures3",
  "superweapons",
  "tahlan",
  "star_federation",
  "TORCHSHIPS",
  "underworld",
  "uaf",
  "US",
  "vic",
  "vayrashippack",
  "weftinships",
  "whichmod",
  "XhanEmpire",
  "yunru_arsenal",
  "yunru_cissonius",
  "yunru_cunt",
  "yunru_ht",
  "yunruhullmods",
  "yunru_midline_expansion",
  "yunru_ose",
  "yunru_pirate_collection",
  "yunruworlds",
  "yunrucore",
  "mir_np",
  "prvExtra",
  "prv",
  "shaderLib"
]}
[close]

[attachment deleted by admin]
« Last Edit: August 17, 2022, 02:04:34 AM by berkenkamp25 »
Logged

ihugyourmom

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Memory Leak (modded game)
« Reply #6 on: August 18, 2022, 06:36:24 AM »

Hello, I was having the same trouble and I just followed Wisp's instruction. Set vmparams to 8GB.

*snip*
I did remove Blackrock Drive Yards because it lists dependencies in the wrong field in the mod_info... what else could be wrong
I recommend removing any mod that can't get something like dependencies in the right field.

I gave up, and started a new game without any faction/ship mods and i also disabled industrial evolution. Else the mod list is the same as prior.
So far no issues at all, and i see no way near the max ram/vram being used if i hit console and check. But then again, that was the same when i had memory leaks so not sure its linked to saturated memory at all.

It could be black rock mod, since iirc its a bootleg since the mod owner aint active, but i havent checked it further. I will continue playing this game without faction mods, and maybe eliminate brdy when i start a new game.

Its clear to me, that its a mod doing it, and its either one of the 4 factions mods or the industrial evolution one. I sadly just ran out of patience to test it, as i need to play the game for about 8 cycles before the memory leaks start to happen. Why i did the "divide and conquer" method to solve it.
Logged

ihugyourmom

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Memory Leak (modded game)
« Reply #7 on: August 18, 2022, 01:54:28 PM »

FML !

It seems i spoke to soon.. the issue is not fixed with removing the faction mods.. cycle 217 and i am *** again.

memory leak screenshot:
https://imgur.com/a/WsAfEmD


Code
 System info:
---------------
Game version: Starsector 0.95.1a-RC6
Game resolution: 1920x1200 (59hz, 32bpp, fullscreen)
Java version: Java(TM) SE Runtime Environment 1.8.0_271-b09 (Java HotSpot(TM) 64-Bit Server VM)
Platform: Windows (64-bit)
JVM RAM: 2,688.47 MB / 7,935.50 (5,247.03 MB free, 7,935.50 MB allocatable)
System RAM: 22,301.72 MB remaining, 32,722.55 MB total
Launch args: -XX:CompilerThreadPriority=1 -XX:+CompilerThreadHintNoPreempt -Djava.library.path=native\\windows -Xms8g -Xmx8g -Xss2048k -Dcom.fs.starfarer.settings.paths.saves=..\\saves -Dcom.fs.starfarer.settings.paths.screenshots=..\\screenshots -Dcom.fs.starfarer.settings.paths.mods=..\\mods -Dcom.fs.starfarer.settings.paths.logs=.

 Graphics card info:
---------------------
GPU Model: NVIDIA GeForce GTX 960
Vendor: NVIDIA Corporation
Driver version: 4.6.0 NVIDIA 516.59
Free VRAM: 2,553.38 MB
Dedicated VRAM: 4,096.00 MB
Maximum VRAM:   4,096.00 MB

 Active mod list:
------------------
Regular mods (10):
 - Adjusted Sector 0.4.2 by NerzhulAI
 - Concord 3.5.2g by Sutopia
 - DIY Planets 1.0.14 by Kentington
 - Grand.Colonies 1.0.d by SirHartley
 - Modern Carriers 1.9.5d by Sutopia
 - Nexerelin 0.10.5 by Histidine (original by Zaphide)
 - Scan Those Gates 1.5.0 by AERO
 - Terraforming & Station Construction 8.1.5 by boggled
 - Unknown Skies 0.43 by Tartiflette
 - WhichMod 1.2.1 by theDragn
Utility mods (13):
 - A New Level of Confidence 40 2.1 by Panteradactyl
 - Autosave 1.2 by LazyWizard
 - Console Commands 2021.12.25 by LazyWizard
 - Detailed Combat Results 5.2.3 by Nick XR
 - Dynamic Tariffs 1.4 by Tuv0x
 - LazyLib 2.7b by LazyWizard
 - MagicLib 0.42.1 by Modding Community: Dark.Revenant, LazyWizard, Nicke, Originem, Rubi, Schaf-Unschaf, Snrasha, Tartiflette, Wisp, Wyvern...
 - Officer Extension 0.4.3 by qcwxezda
 - Planet Search 1.2.0 by andylizi
 - SpeedUp 0.7.2 by DarkRevenant
 - Stellar Networks 2.6.1 by Jaghaimo
 - Version Checker 2.0b by LazyWizard
 - zz GraphicsLib 1.6.1 by DarkRevenant

Have to admit, i spend way to much time on this already. Since i have restarted more times that i care to count, i checked how long i been playing this specific playthrough. Taking into account that i play 15h+/day (yes i know..) and this game started:

start: 15-08-2022 15:29
first memory leak: 18-08-2022 22:49

I think its time for a break from this game. I just find these kinda bugs to be ruining for my enjoyment, only thing left is to play 100% vanilla and enabling mods one at a time, and cycle to 215+.. and that just aint happening :P

Just updated this thread for the purpose of info if any other is having the same issue/s.

fly Safe(ish) o/

edit:
Forgot to add, i enjoy adding features to games i play, so i cant just be satisfied with playing vanilla. As i am sure some will think is the obvious answer to my "problems" :)
« Last Edit: August 18, 2022, 01:57:54 PM by ihugyourmom »
Logged

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: Memory Leak (modded game)
« Reply #8 on: August 18, 2022, 03:45:15 PM »

It seems i spoke to soon.. the issue is not fixed with removing the faction mods.. cycle 217 and i am *** again.
I'd be willing to bet you it's DIY Planets.
Logged

ihugyourmom

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Memory Leak (modded game)
« Reply #9 on: August 19, 2022, 07:42:14 AM »

It seems i spoke to soon.. the issue is not fixed with removing the faction mods.. cycle 217 and i am *** again.
I'd be willing to bet you it's DIY Planets.

It does fit with the cycles, as i usually dont go into colonies till around there (cycle 215+).

If/when i decide to play again, ill keep that in mind. Ty.
Logged

BoogieMan

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: Memory Leak (modded game)
« Reply #10 on: September 11, 2022, 10:24:47 AM »

I noticed that save game and load game seems to take longer and longer the more you save and load in the same session. I played for about 2 hours and would use the quicksave mod from time to time and had no problems. Then I found an event where I could sacrifice ship hulls to a factory to have it make a different ship (maybe from a mod?) and I reloaded my save 3-4 times in quick succession testing out the results (always same ship regardless of size and number of ships) and decided it was a trap since it only gave me a single gremlin so I save scummed back and left it alone. After I explored the ruins and went to save before leaving the system, suddenly it took about 25 seconds to save my game when it's normally around 5 seconds.

I've noticed awhile back with much fewer mods the same thing occurring. I didn't notice actual in game performance being affected, just the saving and loading times which suddenly increased 5x. Maybe they are related.
Logged

SpartanCommander

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: Memory Leak (modded game)
« Reply #11 on: September 13, 2022, 01:37:55 PM »

Having a large mem leak as well the speed of the mem leak with mods seems to get worse and faster lately though.  Which is aggravating due to how funthey are.  One thing that surprised me was how it actually managed to freeze my computer and I had to resort to do a few things to get it back up.  This mem leak as far as I can tell was the main culprit. 

Not sure what's causing the memleak myself when several mods up put in but it needs to be fixed.

And just in case you ask I have 16 Gigs of Ram installed.
Logged