Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Odd possibly-host-OS-dependent crash in Kemet mod  (Read 208 times)

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Odd possibly-host-OS-dependent crash in Kemet mod
« on: May 30, 2023, 10:34:05 AM »

Welp, first up, fatal errors:
Code
111230 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.combat.ai.ProximityFuseAI.updateDamage(Unknown Source)
at com.fs.starfarer.combat.ai.ProximityFuseAI.<init>(Unknown Source)
at com.fs.starfarer.loading.specs.ifsuper.super(Unknown Source)
at com.fs.starfarer.loading.specs.ifsuper.super(Unknown Source)
at com.fs.starfarer.combat.entities.ship.A.J.o00000(Unknown Source)
at com.fs.starfarer.combat.entities.ship.A.J.fireProjectile(Unknown Source)
at com.fs.starfarer.combat.entities.ship.trackers.OoOO.Óo0000(Unknown Source)
at com.fs.starfarer.combat.entities.ship.trackers.OoOO.o00000(Unknown Source)
at com.fs.starfarer.combat.entities.ship.trackers.D.o00000(Unknown Source)
at com.fs.starfarer.combat.entities.ship.trackers.D.o00000(Unknown Source)
at com.fs.starfarer.combat.entities.ship.trackers.OoOO.Ô00000(Unknown Source)
at com.fs.starfarer.combat.entities.ship.A.J.advance(Unknown Source)
at com.fs.starfarer.combat.systems.oOoO.advanceLinked(Unknown Source)
at com.fs.starfarer.combat.systems.oOoO.advance(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.fire(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.advance(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advance(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.super(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
To replicate, put a Net Launcher or Heavy Net Launcher on a ship, load up the simulator, and fire it.
Edit: Or, presumably, an Ultraheavy Net of Enrapture, though I didn't test that one this time.
For me (running on macos), this crash replicates 100% of the time.
At least one other person (running on windows) has reported that it doesn't happen at all for them.

As far as I can tell, the mod doesn't have file-case-sensitivity issues; all the files are in lower case, and all the references to files that I've found are also in lower case.

Since the crash is happening entirely in vanilla code, I figure it's reasonable to toss up a thread here and ask if anyone has any idea what's going wrong.
« Last Edit: May 30, 2023, 10:48:06 AM by Wyvern »
Logged
Wyvern is 100% correct about the math.

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Odd possibly-host-OS-dependent crash in Kemet mod
« Reply #1 on: May 30, 2023, 08:06:07 PM »

Ah-hah! I figured it out (after much trial and error): The reason it works for you but not for me is that the OSes have different file list orders. There's a "hcok_ka_bruterifle_shot_old.proj" in the mod, with the same id specified in the file as is used by all of the net-type guns.*

If the load order comes up with the old version being used, Starsector crashes. If it comes up with the new version being used, then everything works fine.

The solution, then, is to delete that old file - then poof, no more crashes.

* Interestingly, there also exists a "hcok_ka_bruterifle_shot_lrg.proj", but it's unused: the large net gun still uses the same projectile spec as the medium and the small.
Logged
Wyvern is 100% correct about the math.