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); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Fatal issue destroys the game slowly  (Read 2203 times)

Captain Trek

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Fatal issue destroys the game slowly
« on: December 06, 2019, 04:51:42 AM »

In a classic case of "why me?" of the sort that seems to be a weekly occurrence within my cursed family, I've encountered a fatal issue that only one other person on the Discord, Morgan, professes to have encountered before.

What's happening is that I've realized that every time I load up the game, it loads up more slowly the next time, even with the exact same set of mods active. A modlist that once took less than a couple of minutes now takes over eight. There appears to be no way of halting or reversing this degradation, as Morgan reports that not even a complete reinstall fixes it. Morgan also reports that the issue can be transferred to a new PC by transferring across a save file from the old one. However, removing my save files on the current install did not resolve the issue.

It doesn't take a great deal of imagination to realize that, as this process continues, the game will eventually become unlaunchable. I guess this is my reward for working tirelessly to try and assist the modding community...

Without a solution to this issue, this is likely where my Starsector journey ends.
Logged

oiltanker

  • Ensign
  • *
  • Posts: 7
  • Regular person
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #1 on: December 06, 2019, 05:02:33 AM »

Any idea why that happened?

It seems for me that given your description and the nature of save files (xml format) that it is issue of your save becoming bloated by information.

Things to check: when load time increases, check if file-size increases (some save-load data would be nice).

Things that might wrong: some base or mod logic is flawed and does not rewrite some information, instead duplicating it.

Can you provide: mod list, save itself and what actions you were doing before this bug appeared (and steps to reproduce this bug)?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #2 on: December 06, 2019, 09:23:49 AM »

Just to be clear, is the issue with launching the game initially, or with loading a save after the game is already running? It almost sounds like you're talking about the former but then some things make me think it's the latter, so it's hard to suggest anything specific. More than likely an issue with one of the mods, though...

Edit: if it's a "launching the application" issue, running a defrag/making sure you're not out of disk space is worth a shot. So is making sure that, somehow, your graphics driver settings haven't change to force vsync to be on. Other running applications may also do this (especially video capture/related ones).
« Last Edit: December 06, 2019, 09:43:12 AM by Alex »
Logged

Captain Trek

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #3 on: December 07, 2019, 12:09:26 AM »

Edit: if it's a "launching the application" issue

It is.

Morgan was going to try installing a new copy of the game on a partition, and I got tired of waiting for him so I just wound up doing it. This, it turns out, does fix the issue. Not only that, but I decided to try copying the contents of my mods folder over from the old install to the new one, and load times with a particular modlist select remain comparable to what they were with the previous install before the issue cropped up. So it seems that Morgan's experience of duplicating the issue on a new PC by transferring old save data across is borne out, and the issue lies somewhere within the save data.

I'm next going to try overwriting the saves folder of my old install with the saves folder of the new install and see what happens.

EDIT: Removing the "saves" folder from the old install and copy-pasting the "saves" folder from the new install seemed to resolve the issue on the old install... except that close to the end of the loading cycle, this happened...

« Last Edit: December 07, 2019, 12:56:28 AM by Captain Trek »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #4 on: December 07, 2019, 09:46:40 PM »

The error definitely looks mod-related, and the base issue also seems like it is - it sounds like a mod might be writing a bunch of data to files in the common directory, and then reading it on startup, and the amount of data keeps growing.

If you check starsector.log, it should have a stack trace which might point you towards the cause of the current crash, at least; not necessarily the overall culprit.

The contents of the saves/common folder from an install where the launch is slow could also be helpful in figuring out the issue. Nothing else in the saves/ folder could conceivably have any impact on application loading times.
Logged

Captain Trek

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #5 on: December 08, 2019, 02:02:31 AM »

If you check starsector.log, it should have a stack trace which might point you towards the cause of the current crash, at least; not necessarily the overall culprit.

This seems to be the relevant portion of the log:

124714 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.io.FileNotFoundException: ..\saves\common\foo.txt.data (The system cannot find the path specified)
java.io.FileNotFoundException: ..\saves\common\foo.txt.data (The system cannot find the path specified)
   at java.io.FileOutputStream.open(Native Method)
   at java.io.FileOutputStream.<init>(Unknown Source)
   at java.io.FileOutputStream.<init>(Unknown Source)
   at com.fs.starfarer.loading.LoadingUtils.Ó00000(Unknown Source)
   at com.fs.starfarer.settings.StarfarerSettings$1.writeTextFileToCommon(Unknown Source)
   at com.github.isturdy.automaticorders.AutomaticOrders.onApplicationLoad(AutomaticOrders.kt:46)
   at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

The contents of the saves/common folder from an install where the launch is slow could also be helpful in figuring out the issue. Nothing else in the saves/ folder could conceivably have any impact on application loading times.

Considering I wiped both the actual save games and the data in the missions folder to no effect, that definitely appears to be the case. Here is the saves/common folder that was (seemingly) causing the trouble:

https://ufile.io/sm852d08
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1723
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #6 on: December 08, 2019, 08:05:10 AM »

Maybe your saves\common folder was made unreadable somehow in the transfer?

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #7 on: December 08, 2019, 09:09:10 AM »

Considering I wiped both the actual save games and the data in the missions folder to no effect, that definitely appears to be the case. Here is the saves/common folder that was (seemingly) causing the trouble:

https://ufile.io/sm852d08

Thank you! Took a look, and, hmm, nothing really jumps out - all the files are modest in size. The only two that have much of anything in them are console command aliases (config/lw_console_aliases.json.data) and something that looks like it's tracking reload penalties (sun_rs/reload_penalty_record.json.data). It's hard to see how either would cause a minutes-long loading slowdown, though. I suppose deleting one or the other to see if it affects things could narrow it down, but, hmm.

Question: can you tell/do you remember where the extra launch time is spent? Does the bar itself move slower, or is all of the extra time spent after the loading bar fills in completely?


Maybe your saves\common folder was made unreadable somehow in the transfer?

(Just to clarify, that'd be for resolving the current crash, and, right, sounds like a good thing to check. Also, possibly, running the game as admin might help.)
Logged

Captain Trek

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #8 on: December 09, 2019, 01:41:17 AM »

Question: can you tell/do you remember where the extra launch time is spent? Does the bar itself move slower, or is all of the extra time spent after the loading bar fills in completely?

It seemed to me like the normal loading process is just dragged out, but here's a detailed breakdown. Interestingly, it only took about five minutes this time, less than the eight minutes it commonly takes with this particular modlist when the issue is present, but still more than the two or three normally taken:

90 sec: Frozen before bar begins to fill
05 sec: Rapidly fills under "s" and "t"
30 sec: Frozen under "t"
35 sec: slowly fills under "a" and "r"
10 sec: quickly fills under "s" and "e"
65 sec: slowly fills remaining letters
65 sec: Frozen after bar completely full
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Fatal issue destroys the game slowly
« Reply #9 on: December 09, 2019, 09:58:30 AM »

Hmm. Based on that breakdown, it doesn't sound like it could be related to the files in the saves/common/ folder - anything related to that would be in the "frozen after bar completely full" section.

Still, if you could try deleting the files from common one by one to see if it makes a difference, that could be interesting. However, since it went from 8 to 5 minutes seemingly without a reason... that sounds like it'd be difficult to be sure if any changes were from deleting a file from common/ or just random fluctuations.

I'd *really* give defragging a shot, and check your disk for errors. This is sounding more and more like some sort of either hardware or OS issue on your end. Also: if you've got an antivirus on, turning it off could be worth a shot. That could *certainly* interfere with the game loading.

Also, did you check to make sure vsync wasn't forced on in your graphics settings?
Logged