Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Constant memory leak and regular stutter.  (Read 1997 times)

okj

  • Ensign
  • *
  • Posts: 37
    • View Profile
Constant memory leak and regular stutter.
« on: February 10, 2023, 01:33:22 AM »

I'm playing with a fairly large modlist. However, I've not get this many memory leaks before, with even bigger mod list. Right now it's popping up every 15-20 minutes, with my old mod list I can get around 1 hour or more before they start popping up, and even though not a constant 60fps it did not stutter. This is only happening recently when I got a series of new mods after purging my previous mod list.
I'm allocating 6gb of ram, and am using jre8. Is one of these mods the culprit?
This is my new modlist that I'm having problems with:
Code
{"enabledMods": [
  "PAGSM",
  "yunrutechmining",
  "pantera_ANewLevel40R",
  "Adjusted Sector",
  "raccoonarms",
  "lw_autosave",
  "timid_admins",
  "better_deserving_smods",
  "timid_commissioned_hull_mods",
  "su_Concord",
  "diyplanets",
  "istl_dassaultmikoyan",
  "Diktat Enhancement",
  "XLU",
  "su_FairSMod",
  "GrandColonies",
  "hte",
  "IndEvo",
  "interestingportraitspack",
  "internalaffairs",
  "timid_xiv",
  "kazeron",
  "lw_lazylib",
  "lockedAndLoaded",
  "exshippack",
  "MagicLib",
  "make_paragon_great_again",
  "nexerelin",
  "kayse_phaseships",
  "OcuA",
  "Ocutek",
  "progressiveSMods",
  "pt_qolpack",
  "tahlan_scalartech",
  "secretsofthefrontier",
  "shadow_ships",
  "swp",
  "mayu_specialupgrades",
  "speedUp",
  "sun_starship_legends",
  "alcoholism",
  "tahlan",
  "Terraforming & Station Construction",
  "star_federation",
  "timid_tmi",
  "underworld",
  "uaf",
  "US",
  "ungp",
  "UGH",
  "vic",
  "WEAPONARCS",
  "toggleWeapons",
  "yunruhullmods",
  "yunru_pirate_collection",
  "yunrucore",
  "shaderLib"
]}

And this is my older modlist I've been playing with fairly normally, all downloaded about 3-4 months ago:
Code
{"enabledMods": [
  "PAGSM",
  "yunrutechmining",
  "pantera_ANewLevel40R",
  "Adjusted Sector",
  "sd_advancedHullMods",
  "A_S-F",
  "ash",
  "Arkships",
  "armaa",
  "raccoonarms",
  "automatic-orders",
  "lw_autosave",
  "battlefleets",
  "bsgportraitspack",
  "battletechportraitpack",
  "timid_admins",
  "better_deserving_smods",
  "blackrock_driveyards",
  "bruh_moment_console_commands",
  "ORK",
  "CVFEHE",
  "CVFEH",
  "CaptainsLog",
  "CAS",
  "su_Concord",
  "lw_console",
  "diyplanets",
  "istl_dassaultmikoyan",
  "hm_flagpack",
  "diableavionics_ornate",
  "diableavionics",
  "pt_exiledSpace",
  "lyr_ehm",
  "fluffships",
  "GrandColonies",
  "Guardian_prototype",
  "HMI",
  "gunnyhegexpeditionary",
  "hte",
  "HIVER",
  "hullmod_specialization",
  "IndEvo",
  "Interstellar Federation Refurbished -unbalanced-",
  "timid_xiv",
  "JYD",
  "LTA",
  "lw_lazylib",
  "leadingPip",
  "ArkLeg",
  "luddenhance",
  "exshippack",
  "MagicLib",
  "MFE",
  "Mayasuran Navy",
  "su_CarrierHullmod",
  "more_hullmods",
  "nexerelin",
  "kayse_phaseships",
  "TAR",
  "progressiveSMods",
  "pt_qolpack",
  "yunru_pilot_radiant",
  "SalvageEverything",
  "sanguinary_autonomist_defectors",
  "tahlan_scalartech",
  "swp",
  "ShiplessFactions",
  "speedUp",
  "stelnet",
  "StopGapMeasures3",
  "tahlan",
  "presmattdamon_takenoprisoners",
  "Terraforming & Station Construction",
  "Tesseract_prototype",
  "star_federation",
  "uaf",
  "US",
  "vayrashippack",
  "toggleWeapons",
  "mir_np",
  "prv",
  "shaderLib"
]}
« Last Edit: February 10, 2023, 01:36:07 AM by okj »
Logged

Serenitis

  • Admiral
  • *****
  • Posts: 1468
    • View Profile
Logged

okj

  • Ensign
  • *
  • Posts: 37
    • View Profile
Re: Constant memory leak and regular stutter.
« Reply #2 on: February 12, 2023, 12:57:59 AM »

Not necessarily a solution, but may be of use:
https://fractalsoftworks.com/forum/index.php?topic=25654.0
https://fractalsoftworks.com/forum/index.php?topic=25127.0
Most of the solutions in these posts is already present in my game. I already installed jre 8, with the custom vmparam from discord. One of the post does suggest it's DIY planet, but I'm getting these messages as soon as I start a new campaign and sometime as soon as I load my save first time for a session. One option is to just ignore it as I'm running jre8 but it happens so regularly that at times I get upto 6 copies of my campaign in memory.
So far the main suspects for me are:
Concord mods,
Starship Legends,
Unknown Skies,
Locked and Loaded.
« Last Edit: February 12, 2023, 01:03:56 AM by okj »
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Constant memory leak and regular stutter.
« Reply #3 on: February 12, 2023, 09:58:16 AM »

You can use console commands to generate a file with everything Starsector has in memory at a given moment ("dumpheap confirm"). You'll want to run it once you have several copies of the campaign in memory. It might take a while. If you upload that file I'll take a look at it.

Ontheheavens

  • Commander
  • ***
  • Posts: 137
    • View Profile
Re: Constant memory leak and regular stutter.
« Reply #4 on: February 12, 2023, 10:24:14 PM »

Try to disable Nexelerin and see if the problem persists. I've found that, while by itself pretty safe, Nexelerin's integrated Version Checker can be up to some enigmatic behaviour with threads, which can lead to a leak if some other mods (was Stelnet for me) are enabled beside it.
Logged
   

okj

  • Ensign
  • *
  • Posts: 37
    • View Profile
Re: Constant memory leak and regular stutter.
« Reply #5 on: February 13, 2023, 10:24:08 AM »

You can use console commands to generate a file with everything Starsector has in memory at a given moment ("dumpheap confirm"). You'll want to run it once you have several copies of the campaign in memory. It might take a while. If you upload that file I'll take a look at it.
Thanks for helping me with this.
Here's the file. It's quite big though. I dumped it when there were 6 copies of the campaign data in memory.
https://drive.google.com/file/d/1VROfhSN4DOJwbicULU60Q_PR4PleCU8H/view?usp=sharing
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Constant memory leak and regular stutter.
« Reply #6 on: February 13, 2023, 01:04:26 PM »

Thanks for helping me with this.
Here's the file. It's quite big though. I dumped it when there were 6 copies of the campaign data in memory.
Well, unfortunately there's a good chance I won't be of much help after all, because I'm only seeing one instance of CampaignEngine in the memory dump. It's possible that several copies of the campaign are leaking briefly and then getting cleaned up (which could take long enough to cause serious stutter). Usually that would only happen upon reloading, but not necessarily. I've personally never seen more than 3 copies (even while debugging memory leaks), so something's definitely going wrong. Have you noticed any pattern to when the stutters occur? (e.g. at the end of each month or when a specific thing happens in-game)

okj

  • Ensign
  • *
  • Posts: 37
    • View Profile
Re: Constant memory leak and regular stutter.
« Reply #7 on: February 13, 2023, 05:42:48 PM »

Thanks for helping me with this.
Here's the file. It's quite big though. I dumped it when there were 6 copies of the campaign data in memory.
Well, unfortunately there's a good chance I won't be of much help after all, because I'm only seeing one instance of CampaignEngine in the memory dump. It's possible that several copies of the campaign are leaking briefly and then getting cleaned up (which could take long enough to cause serious stutter). Usually that would only happen upon reloading, but not necessarily. I've personally never seen more than 3 copies (even while debugging memory leaks), so something's definitely going wrong. Have you noticed any pattern to when the stutters occur? (e.g. at the end of each month or when a specific thing happens in-game)
I think it happens the most at launch (when I first load a game), but other than that it feels random to me.
Logged