Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); In-development patch notes for Starsector 0.98a (2/8/25)

Pages: 1 [2]

Author Topic: Mod games wont load  (Read 5447 times)

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: Mod games wont load
« Reply #15 on: October 09, 2013, 04:06:08 PM »

I suspect there is an issue with Exerelin holding onto previous data when loading a save/starting a new game having previously been in a game.

There is a singleton class (ExerelinData) that performs (among other things) the function that is now provided by PersistentData. There is also a static reference to the currently loaded SectorAPI to compare for catching the load/new game event. When loading/starting a new game for at least 1 frame the old game data will still be referenced, before the references are switched to the new loaded data.

I'm assuming that until that happens there are actually two copies of whatever data is referenced from ExerelinData (and so on down the tree, which could be a lot); one from the previous game via the ExerelinData instance, and one from the newly loaded game. Once the references in ExerelinData are updated and point at the new game data I assume the previous game data can be cleaned up.

So, I suspect (hope) that this can be fixed when I move Exerelin over to use PersistentData; I just need to actually do that :)
Logged

Withering

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: Mod games wont load
« Reply #16 on: October 10, 2013, 09:20:59 AM »

The mod that seems to have the memory leak is the kadur theocracy mod.

Of course, just when I started my new saved game with that faction.... xD

Daym.
Logged
Pages: 1 [2]