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: Codex Overhaul (05/11/24)

Author Topic: Irregular Crash Mid-Game  (Read 288 times)

Jono_9

  • Ensign
  • *
  • Posts: 5
    • View Profile
Irregular Crash Mid-Game
« on: May 04, 2024, 04:53:22 AM »

Since starting a run on 0.97a-RC11, I've had frequent but irregular 'Fatal: null    Check starsector.log for more info' crashes.

So far I've just reloaded and done something slightly different and that's been enough to avoid a crash (at least for some time).

Now, though, I'm trying to do a story mission (find Coureuse) in the Isirah system and I can't seem to do it without the crash occuring.

Here is my log after one of the reload attemps. All of the crashes I've checked the log for during this save (including those before this Isirah mission) have started with the 'PirateBaseIntel' lines.

Spoiler
18853 [Thread-3] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 38
18853 [Thread-3] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Loading stage 39 - last
20592 [Thread-7] INFO  sound.O  - Cleaning up music with id [miscallenous_main_menu.ogg]
20881 [Thread-9] INFO  sound.O  - Creating streaming player for music with id [miscallenous_corvus_campaign_music.ogg]
20881 [Thread-9] INFO  sound.OooO  - Playing music with id [miscallenous_corvus_campaign_music.ogg]
25915 [Thread-3] INFO  com.fs.starfarer.api.impl.campaign.intel.AnalyzeEntityMissionIntel  - Created AnalyzeEntityMissionIntel: Derelict Ship, faction: Persean League
30647 [Thread-3] INFO  com.fs.starfarer.api.impl.campaign.intel.AnalyzeEntityMissionIntel  - Created AnalyzeEntityMissionIntel: Domain-era Probe, faction: independent
32893 [Thread-9] INFO  sound.O  - Creating streaming player for music with id [campaign_music_part_2_v28.ogg]
32893 [Thread-9] INFO  sound.OooO  - Playing music with id [campaign_music_part_2_v28.ogg]
35432 [Thread-3] INFO  com.fs.starfarer.api.impl.campaign.intel.SurveyPlanetMissionIntel  - Created SurveyPlanetMissionIntel: Glitonea, faction: Tri-Tachyon
43361 [Thread-3] INFO  sound.O  - Cleaning up music with id [miscallenous_corvus_campaign_music.ogg]
43361 [Thread-3] INFO  sound.O  - Cleaning up music with id [campaign_music_part_2_v28.ogg]
44543 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.api.impl.campaign.intel.bases.PirateBaseIntel.updateStationIfN eeded(PirateBaseIntel.java:502)
   at com.fs.starfarer.api.impl.campaign.intel.bases.PirateBaseIntel.checkForTierChan ge(PirateBaseIntel.java:626)
   at com.fs.starfarer.api.impl.campaign.intel.bases.PirateBaseIntel.advanceImpl(PirateBaseIntel.java:589)
   at com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:78)
   at com.fs.starfarer.api.impl.campaign.intel.BaseEventManager.advance(BaseEventManager.java:114)
   at com.fs.starfarer.api.impl.campaign.intel.bases.PirateBaseManager.advance(PirateBaseManager.java:59)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.advance(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.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24251
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #1 on: May 04, 2024, 09:13:42 AM »

Hi - sorry about the trouble! Are you loading a save from a previous version of the game? Unfortunately that's not going to work, and this crash looks like that's the problem.
Logged

Jono_9

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #2 on: May 04, 2024, 09:34:20 PM »

No, I started the campaign in March on 0.97a-RC11.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24251
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #3 on: May 05, 2024, 08:39:08 AM »

Hmm. Is this vanilla, or with mods?

Looking at the vanilla code, this crash seems .. well, I'd say "impossible" but I know better. But basically, the game is crashing because a certain variable - a pirate base commander - is null. But in vanilla code for 0.97a, it's guaranteed to be set by the time this code is called, and nothing in vanilla sets it again. The only possibility that comes to mind is if something goes very badly wrong when the savegame is loaded, but that also seems rather unlikely, so I'm a bit stumped!

IF this is vanilla, could you email me your save so I can take a look?

fractalsoftworks [at] gmail [dot] com
Logged

Jono_9

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #4 on: May 08, 2024, 02:36:09 AM »

Yes, vanilla.

I was able to complete the mission after deleting two pirate-affiliated contacts in the intel screen, so the issue seems to be resolved for now.

I've emailed you the save if you're still curious.

Thanks very much.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24251
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #5 on: May 08, 2024, 09:27:28 AM »

Thank you for emailing me the save! This is after you'd deleted the pirate contacts, right? Since I'm not seeing them in your contacts list, and not experiencing the crash. Just wanted to confirm.

(Edit: added some code to prevent the crash, regardless of how it might come about! Though I'm still not sure how this state is even possible.)
« Last Edit: May 08, 2024, 09:30:23 AM by Alex »
Logged

Jono_9

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #6 on: May 14, 2024, 03:35:40 AM »

Apologies, I realise I sent you a much older save.

The intermittent crashes have continued until now, when I've gotten stuck again. It seems to crash ~10 seconds after unpause no matter what I do.

I've emailed you the save.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24251
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #7 on: May 14, 2024, 09:12:37 AM »

Thank you for sending the save! So, the weird thing is it works fine for me - I even tried it on a fresh install of 0.97a-RC11, to make sure it's not something I changed in my dev version. I loaded up the save and flew all the way to your laid-in-course target - Lost Astropolis - without a crash.

Can you try doing a clean re-download and reinstall of the game? ("Clean" meaning manually deleting the game folder, after copying off your saves/screenshots/mods folders somewhere so you can keep them, then copying those back once the fresh install is in place.) This is starting to sound like some kind of corrupted game install issue.

(And, just to confirm: did you do any tweaking of the java that the game runs on, such as changing vmparams or switching it to java 8? That *shouldn't* cause something like this so I'd expect the answer is no, but just for the sake of completeness, because this is so very strange.)
Logged

Jono_9

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #8 on: May 15, 2024, 01:44:38 AM »

Yep, a reinstall seems to have fixed it.

It's always the simple things; turn it off and on again, uninstall and reinstall it...

Thank you so much for your continued help.

And no, I hadn't messed with any of the java settings.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24251
    • View Profile
Re: Irregular Crash Mid-Game
« Reply #9 on: May 15, 2024, 08:15:30 AM »

Glad to help, and glad that did it!

(And, hah, you're right. Funny how that is.)
Logged