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: CTD caused by corrupted ship data?  (Read 836 times)

Talinoth

  • Ensign
  • *
  • Posts: 42
    • View Profile
CTD caused by corrupted ship data?
« on: November 17, 2021, 03:21:32 AM »

UPDATE: Confirmed not to be an encounter bug specifically, but actually a bug with a ship I salvaged! As soon as it enters the screen in the Fleet (F) or Refit (R) pages, the game crashes to desktop. Game crash is also triggered by mousing over the Draft while in an encounter with another fleet.

===

https://imgur.com/a/5YqnSCu

I've been getting instant crash to desktop after engaging enemy fleets on the campaign map. This is a long running game, 9 cycles in, and I've only just started encountering this problem now. I thought it was just a bug I had with Shadowyards, but I also got this problem when I tried to help a Cabal fleet fight a Sindrian Lions task group. Tahlan Shipworks is mentioned in the crash log for some reason?

It may also be a Commissioned Crews bug. In the meantime, I'll try and recreate the crash bug with other factions.

Spoiler
75754 [Thread-3] INFO  ruthless_sector.campaign.NexCompatibleFleetInteractionDialogPlugin  - NexCompatibleFleetInteractionDialogPlugin chosen
75782 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [data/config/exerelin/miningConfig.json]
75784 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\Dassault-Mikoyan Engineering]
75784 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\Nexerelin]
75785 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\Roider Union]
75785 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\tahlan-shipworks]
75786 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\prv Starworks]
75787 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\Dassault-Mikoyan Engineering]
75787 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\Nexerelin]
75788 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\Roider Union]
75788 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\tahlan-shipworks]
75788 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\prv Starworks]
75790 [Thread-3] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading CSV data from [DIRECTORY: C:\Games\Starsector\starsector-core\..\mods\Nexerelin]
76092 [Thread-3] INFO  sound.oo0O  - Cleaning up music with id [campaign_music_part_2_v28.ogg]
76246 [Thread-9] INFO  sound.oo0O  - Creating streaming player for music with id [faction_diktat_encounter_01_neutral.ogg]
76246 [Thread-9] INFO  sound.OooO  - Playing music with id [faction_diktat_encounter_01_neutral.ogg]
76265 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.hullmods.tahlan_CHMLegio.applyEffectsBeforeShipCreation(tahlan_CHMLegio.java:23)
   at com.fs.starfarer.campaign.fleet.FleetMember.updateStats(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetMember.init(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetMember.<init>(Unknown Source)
   at com.fs.starfarer.title.Object.M.o00000(Unknown Source)
   at com.fs.starfarer.title.Object.M.render(Unknown Source)
   at com.fs.starfarer.coreui.OO0o.super(Unknown Source)
   at com.fs.starfarer.ui.newnew.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.impl.StandardTooltipV2.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.render(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

I don't know what mod or issue might be causing it, but Tahlan Shipworks is mentioned in the Starsector.log crash log. Am I barking up the wrong tree? I'd love to know what is causing this.

Game Version: 0.95a-RC15
Mod List:
Spoiler
- $$$ Trailer Moments 1.2 [recommended/requires RC10]
- A New Level of Confidence 25.1.1 [req. RC12]
- Beyond the Sector 1.0.0 [req. RC12]
- ClearCommands 1.0.d [req. 0.95a]
- Commissioned Crews 1.999999gg [Current update/RC15] (!!! I think this may be one of the mods causing the crash bug !!!)
- Dassault Mikoyan Engineering 1.54a [Current]
- Detailed Combat Results 5.1.2 [Current]
- Diable Avionics 2.63RC5 [Current]
- Hostile Intercept (and Autopause!) 1.3.2 [req. 0.95a]
- Kadur Remnant 3.2.3 [req. RC9]
- Lazy Lib 2.7 [Current]
- Legacy of Arkgenesis v1.9.10 [Current]
- Luddic Enhancement 1.2.5f [RC14]
- MagicLib 0.34 [Current]
- Nexerelin 0.10.3c [Current]
- Planetary Shield - Access Control 1.4 [Current]
- Roider Union 1.2.2 [RC12]
- Ruthless Sector 1.2.8 [Current]
- ScyNation 1.6.4 [Current]
- Shadowyards 0.9.5-rc4 [req. 0.95a]
- SpeedUp 0.7.1 [RC10]
- Starship Legends 1.5.5 [Current]
- Stellar Networks 1.2.1 [Current]
- Tahlan Shipworks 0.7.4 [req. RC69] [?!] [possible cause of crash to desktop?]
- Transfer All Items 1.2 [req. 0.95a]
- Underworld 1.6.1 [req. RC12]
- Unknown Skies 0.43 [req. RC9]
- WhichMod 1.1.0 [Current]
- prv Starworks v21
- zz GraphicsLib 1.5.1
[close]

EDIT: Updated my Java, fought a battle against a Sindrian patrol fleet, nothing special happened. As soon as I leave the battle and get to the dialogue menu allowing me to pursue the remaining enemy ships, the game crashed to desktop again.

Spoiler
602903 [Thread-3] INFO  ruthless_sector.ModPlugin  - Player strength: 177.42001342773438
602912 [Thread-3] INFO  data.scripts.combatanalytics.damagedetection.EveryFrameDamageDetector  - Total time in EveryFrameDamageDetector: 1106 ms Long frame count: 0 FrameCount: 22833 Mean Time Per Frame: 0.05ms
602913 [Thread-3] INFO  data.scripts.combatanalytics.damagedetection.EveryFrameDamageDetector  - Projectile Processing: Accuracy: 99%  Resolved Damages: 12504 (826244)  Unassigned ListenerDamages: 101 (65750)  Unassigned FrameDamages: 40 (0)
602913 [Thread-3] INFO  data.scripts.combatanalytics.damagedetection.EveryFrameDamageDetector  - Beam Processor: Assigned Damages: 4304 (6%)  Inferred Damages: 54188 (74%)  Prior Damages 14435 (20%)
602913 [Thread-3] INFO  data.scripts.combatanalytics.damagedetection.EveryFrameDamageDetector  - Unclaimed Processor:  Total: 1029  Explosions: 236 (23%)  Custom: 0 (0%)  Collision: 262  Unknown 514 (50%)
603063 [Thread-3] INFO  data.scripts.combatanalytics.SerializationManager  - Loaded 51 prior battle results using 0.62MB of memory in 40ms
603064 [Thread-3] INFO  data.scripts.combatanalytics.CampaignEventListener  - Created combat report:  Sindrian Diktat Lion's Guard Detachment (160 total ships involved) on 2021-11-17 21:52:46  730,261 total damage exchanged
604108 [Thread-7] INFO  sound.oo0O  - Cleaning up music with id [battle_ambience_01.ogg]
604335 [Thread-9] INFO  sound.oo0O  - Creating streaming player for music with id [faction_diktat_encounter_02_hostile.ogg]
604335 [Thread-9] INFO  sound.OooO  - Playing music with id [faction_diktat_encounter_02_hostile.ogg]
610596 [Thread-7] INFO  sound.oo0O  - Cleaning up music with id [faction_diktat_encounter_02_hostile.ogg]
610839 [Thread-9] INFO  sound.oo0O  - Creating streaming player for music with id [battle_ambience_01.ogg]
610839 [Thread-9] INFO  sound.OooO  - Playing music with id [battle_ambience_01.ogg]
614916 [Thread-3] INFO  sound.oo0O  - Cleaning up music with id [campaign_music_part_2_v28.ogg]
614926 [Thread-7] INFO  sound.oo0O  - Cleaning up music with id [battle_ambience_01.ogg]
615117 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.hullmods.tahlan_CHMLegio.applyEffectsBeforeShipCreation(tahlan_CHMLegio.java:23)
   at com.fs.starfarer.campaign.fleet.FleetMember.updateStats(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetMember.init(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetMember.<init>(Unknown Source)
   at com.fs.starfarer.title.Object.M.o00000(Unknown Source)
   at com.fs.starfarer.title.Object.M.render(Unknown Source)
   at com.fs.starfarer.coreui.OO0o.super(Unknown Source)
   at com.fs.starfarer.ui.newnew.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.impl.StandardTooltipV2.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
615342 [Thread-9] INFO  sound.oo0O  - Creating streaming player for music with id [battle_ambience_01.ogg]
615342 [Thread-9] INFO  sound.OooO  - Playing music with id [battle_ambience_01.ogg]
[close]

EDIT 2: This crash doesn't happen all the time, but it's very consistent and happens both in hyperspace and in solar systems. I also find it really weird that I successfully interacted with a Sindrian fleet, engaged and defeated it, but then CTD'ed on the aftermath/pursuit screen.

The very first time this happened, I engaged a Shadowyards Fast Picket in system Yajna near planet Jnana that was fighting pirate invaders. Curiously, I made it through the encounter screen, but crashed when deploying ships.

After that, all crashes to desktop have been a result of directly encountering fleets. I wonder if my save file is corrupted? I'm going to go pick more fights on a backup save from 2 cycles ago and see if there's still an issue.

EDIT 3: I've tried to recreate this issue on the older save, and everything is fine. Picked multiple fights against Sindrians, went into open war, no music errors, and no crashes It seems to be a result of something that happened recently in my latest save.

EDIT 4: Crash is happening in the Ship Refit (R) screen without me encountering any enemy fleets! Fascinating.
Aha! A specific ship in my fleet is causing a crash to desktop whenever I click on it! And only that ship!
 
Spoiler
61323 [Thread-9] INFO  sound.oo0O  - Creating streaming player for music with id [campaign_music_part_2_v28.ogg]
61323 [Thread-9] INFO  sound.OooO  - Playing music with id [campaign_music_part_2_v28.ogg]
64879 [Thread-7] INFO  sound.oo0O  - Cleaning up music with id [campaign_music_part_2_v28.ogg]
65029 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.hullmods.tahlan_CHMLegio.applyEffectsBeforeShipCreation(tahlan_CHMLegio.java:23)
   at com.fs.starfarer.campaign.fleet.FleetMember.updateStats(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetMember.init(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetMember.<init>(Unknown Source)
   at com.fs.starfarer.title.Object.M.o00000(Unknown Source)
   at com.fs.starfarer.title.Object.M.render(Unknown Source)
   at com.fs.starfarer.coreui.OO0o.super(Unknown Source)
   at com.fs.starfarer.ui.newnew.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.e$Oo.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.e.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.coreui.refit.F.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.class.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Oo0O.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.K.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.ui.v.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.render(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.render(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
65325 [Thread-9] INFO  sound.oo0O  - Creating streaming player for music with id [campaign_music_part_2_v28.ogg]
65325 [Thread-9] INFO  sound.OooO  - Playing music with id [campaign_music_part_2_v28.ogg]
[close]

I also tried to sell off the offending ship at a station, but crashed to desktop while I was in the F ship display screen as soon as I scrolled down. It's hard to even get a screenshot of the ship or description of it without the game crashing. https://imgur.com/a/I9Z7bKS

If I scroll any further down, the game instantly crashes lmao.

EDIT 5: Crashes are happening in both refit and Fleet screen. I scroll down and the game crashes and dies like I locked eyes with a Basilisk. This must be a result of one of my most recent ship acquisitions. It was a mid-journey salvage - I wonder if one of the Commissioned Crew hull mods didn't get applied to it properly or something stupid like that?
I think it's a Diable Avionics Draft that I salvaged and added 3 S mods to, intended as reusable cannon fodder. For some reason it's causing crashes. Any suggestions on removing it from my save file?

In fact, I just entered an encounter with a neutral Pirate fleet, and as soon as I moused over the Draft, the game crashed!
I didn't know you could have a corrupted ship lol.

EDIT 6: Here's a link to my save file on Google Drive, hopefully this works.
https://drive.google.com/drive/folders/1prJ9Zj21kYQ786zdH0kF4mXt93aE7Yjz?usp=sharing
« Last Edit: November 17, 2021, 09:52:30 AM by Talinoth »
Logged

Talinoth

  • Ensign
  • *
  • Posts: 42
    • View Profile
Re: CTD when encountering enemy fleets
« Reply #1 on: November 17, 2021, 06:42:09 AM »

SUMMARY - The ISS Aristomachus [Draft (D class)] ship in my fleet has corrupted files or something, and is causing an instant crash to desktop when I look at it in the Refit or Fleet screens, as well as in encounters with other fleets (which is when the ship data gets referenced, and the first time I had the CTD issue appear). I am unable to do anything to this ship - can't make any alteration, move it, or delete it, because my game will instantly crash as soon as its data appears on screen in any way.

...

I've been fooling around in various menus. Starship Legends has a "Reports" menu in the Intel screen (E) where you can see which of your ships got positive or negative bonuses, how their combat ratings changed, how much damage they took and did, etc etc.
I can also use it as a list of all my ship names and their classes without crashing my game.

From this screen I can confirm at least that it is the ISS Aristomachus [Draft (D Class)]. That's because I've been able to see every other ship in my Refit screen and not crash my game. By process of elimination, it's this ship causing the problem.

I've also confirmed that I don't have any problems on my other saved games. All I have to do is remove this ship and just this ship, and I will be able to continue my playthrough!

But I installed the Console Commands mod and noticed a big problem - the suicide command either only destroys the ship I'm piloting, or my entire fleet. That's not acceptable, so I need an alternative.

Does the game have;

- A save file error check/fix I can do?
- Any way to delete a specific ship through console commands without having to manually do it through the Fleet screen?
- Some method for me to change which ship I am piloting through console commands? (I could then suicide just that one ship.)
- A kind of safe mode command that will stop the application from terminating even if there is a critical error?
- Or even a way to store individual ships Storage through a console command, ID by ID, until I'm left with just the bugged ship so I can Suicide it?

I still haven't figured what if any mod conflict or other error might be causing this.

One curious note: When I open the Console Commands menu with CTRL + Backspace and use the 'PrintStarshipLegendsData' command, I noticed that the ISS Aristomachus' data is missing from the list of ships despite every other ship I've ever used being in there. Is that because I never got to use it in a real battle, or because its Starship Legends data is corrupted?
EDIT: I cleared the ISS Aristomachus' Starship Legends reputation data using 'clearrep Draft'. Game still insta crashed. That 'aint it.
« Last Edit: November 17, 2021, 09:17:29 AM by Talinoth »
Logged

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: CTD when encountering enemy fleets
« Reply #2 on: November 17, 2021, 09:53:28 AM »

Post this to Tartiflette's forum thread and tell him his diableavionics_draftarmormodule has a FIGHTER hull size for some weird reason.

Alternatively, as a soft workaround, you can go into Commissioned Crews\data\config\setting.json and set CHM_AutoApplyToModules to false.

RustyCabbage

  • Captain
  • ****
  • Posts: 347
    • View Profile
Re: CTD caused by corrupted ship data?
« Reply #3 on: November 17, 2021, 10:16:52 AM »

This should be able to remove the ship from your fleet. Just copy paste into console commands.
Code
runcode Iterator<FleetMemberAPI> iter = $playerFleet.getMembersWithFightersCopy().iterator();
while(iter.hasNext()) {
FleetMemberAPI m = (FleetMemberAPI) iter.next();
if (m.getHullId().startsWith("diableavionics_draft")) {
$print("Removing " + m.getShipName());
$playerFleet.removeFleetMemberWithDestructionFlash(m);
}
}

Talinoth

  • Ensign
  • *
  • Posts: 42
    • View Profile
Re: CTD caused by corrupted ship data?
« Reply #4 on: November 17, 2021, 10:28:08 AM »

This should be able to remove the ship from your fleet. Just copy paste into console commands.
Code
runcode Iterator<FleetMemberAPI> iter = $playerFleet.getMembersWithFightersCopy().iterator();
while(iter.hasNext()) {
FleetMemberAPI m = (FleetMemberAPI) iter.next();
if (m.getHullId().startsWith("diableavionics_draft")) {
$print("Removing " + m.getShipName());
$playerFleet.removeFleetMemberWithDestructionFlash(m);
}
}

THANK YOU! It worked! The ship is gone. Now let's test if I can go and kill things again...

EDIT: Yep. Went through Fleet and Refit screens, no crashes. Sold all my supplies to a pirate base then raided it twice, blew it up, claimed the bounty, no crashes.
It really was that one damn ship. I wonder how that happened?
« Last Edit: November 17, 2021, 10:41:30 AM by Talinoth »
Logged