Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2

Author Topic: Crash on killing a Tempest  (Read 1399 times)

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Crash on killing a Tempest
« on: October 04, 2022, 10:11:40 PM »

This happened with a bunch of mods enabled, but the stack trace looks to be pure vanilla. Happened when I killed an enemy Tempest. Though I did have some ships with fighters in my own fleet, so, actual cause unclear.

Code
5649621 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.combat.ai.movement.maneuvers.N.<init>(Unknown Source)
at com.fs.starfarer.combat.ai.FighterAI.pickManeuver(Unknown Source)
at com.fs.starfarer.combat.ai.FighterAI.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)

Retrying the battle did not result in the same crash, so whatever this is is intermittent.

Starsector 0.95.1a-RC6
"modlist"
Console Commands 2021.12.25
Deluxe Player Flags 1.01a
Diable Avionics 2.64 rc1
GraphicsLib 1.6.1
Holy Covenant of Kemet 0.2.2h
Interstellar Imperium 2.5.2
Kingdom of Terra 0.13.1
LazyLib 2.7b
Legacy of Arkgneisis 1.9.11
Locked and Loaded 0.12 rc1
MagicLib 0.42.1 rc3
Neutrino Detector MkII 1.3
Nexerelin 0.10.5b
Object Analysis 002
ORA 0.94 rc2
Seeker 0.51 rc2
Shadowyards 0.9.5 rc4
Ship and Weapon Pack 1.13.0
Starship Legends 2.1.2
Underworld 1.71
...and a few personal mods that shouldn't be doing anything to mess with combat.
[close]
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Crash on killing a Tempest
« Reply #1 on: October 05, 2022, 08:27:25 AM »

Thank you for the report! Hmm. You're on windows, right? Not getting too much out of that stack trace, unfortunately.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Crash on killing a Tempest
« Reply #2 on: October 05, 2022, 08:42:00 AM »

Nope, MacOS.

(Edit: And, huh, I was half-expecting this one to be obvious - something like 'if the Tempest dies in the same frame in which it spawns a new terminator drone, then the reference to the fighter's mothership is null'. Annoying if it's not actually that simple, for sure. Though, hm, if it were just that, I'd've expected it to get reported by now. Maybe something wonky with the fighters I had on my side is more likely? I dunno.)

If it helps any, the ship I was piloting is a fancy multi-module ship, and one of those modules has a single built-in wing of fighters.
« Last Edit: October 05, 2022, 08:48:07 AM by Wyvern »
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Crash on killing a Tempest
« Reply #3 on: October 05, 2022, 09:07:16 AM »

Knowing that it's OS X helps quite a bit, thank you!

Looking through the method where it crashes - I went through line-by-line, it's still possible that I missed something, of course, but I have a reasonable degree of confidence in this - it's really hard to see how this might happen.

The only two possibilities that come to mind are:
1) Some code somewhere adds a null weapon to the fighter (in which case I'd really expect it to blow up earlier, but *maybe*), or
2) Some mod-code calls methods not exposed in the API and sets the fighter's wing to null (or messes with the fighter wing and sets its spec to null, or some other such)

I'm not seeing any other way this could happen. Again, this doesn't 100% mean it couldn't, but... hmm.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Crash on killing a Tempest
« Reply #4 on: October 05, 2022, 10:33:25 AM »

Huh. Then I'd say it's almost certain that this is a bug with Seeker's Balisong-class cruiser. Somehow. I'll go post a link over in the mod thread.

Unfortunately, that mod doesn't distribute source with its jar, so I don't have any more guess as to what's going on here.
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Crash on killing a Tempest
« Reply #5 on: October 05, 2022, 10:37:31 AM »

Thank you for doing that! It's still possible it's something in vanilla, just, not able to spot it.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Crash on killing a Tempest
« Reply #6 on: October 06, 2022, 11:27:29 PM »

Whee, just had this happen again... in a fight without the Balisong involved. So much for that 'obvious culprit'.

It did, once again, occur upon the death of an enemy frigate that my ship was targeting... but said frigate didn't have fighters. (My ship did, but they were regular bombers, not anything exotic.)
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Crash on killing a Tempest
« Reply #7 on: October 07, 2022, 07:05:52 AM »

Would you mind posting the stack trace, if you still have that handy? Juuuust to make it's actually exactly the same thing.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Crash on killing a Tempest
« Reply #8 on: October 07, 2022, 08:05:51 AM »

Sure, here you go:
Code
1328673 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.combat.ai.movement.maneuvers.N.<init>(Unknown Source)
at com.fs.starfarer.combat.ai.FighterAI.pickManeuver(Unknown Source)
at com.fs.starfarer.combat.ai.FighterAI.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)
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Crash on killing a Tempest
« Reply #9 on: October 07, 2022, 07:51:14 PM »

Thank you - yeeeeah, that's the same one. Hmm. I'll keep an eye out for this - not sure what else I can really do about this, since I've already gone through the code with a fine-toothed comb. I did add a failsafe null check, but I don't have high hopes for it as the thing it's checking for seems impossible.

If you get a better idea for what conditions might be causing this (or, even a reproducible scenario! though that's a bit much to hope for for this one, isn't it), I'd really appreciate you letting me know!
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Crash on killing a Tempest
« Reply #10 on: October 07, 2022, 07:56:08 PM »

Will do. I'm currently working on the horribly horribly tedious task of* trying to track down which mod is triggering the problems. Which basically involves turning things off a few at a time and then playing for a while and hoping it crashes. Because it is so very hard to prove a negative with something as intermittent as this.

If I get any further information on this, I'll come back and post it.

*Edited in footnote: Added a strikethrough because this is mostly overstatement for amusement value; I turned off a few mods that I trust a bit less and started a new game; this is less 'focused testing' and more 'well I can live without those things and maybe it'll tell me something'.
« Last Edit: October 07, 2022, 11:26:32 PM by Wyvern »
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Crash on killing a Tempest
« Reply #11 on: October 07, 2022, 08:02:19 PM »

Thank you, I *super* appreciate you putting this much time into it! Please don't feel obligated to, I kind of feel bad - and, again, I can't 100% promise it's actually a mod.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3803
    • View Profile
Re: Crash on killing a Tempest
« Reply #12 on: October 08, 2022, 08:58:28 PM »

Small update here: had a stable run so far, no crashes. Which means that I'd give it about 60% odds that this bug is from Kingdom of Terra, and 20% odds that it's from the latest version of Holy Covenant of Kemet... and 20% odds that it's neither of those and just hasn't happened to hit me yet this run.

(Kingdom of Terra is absurd fun - emphasis on 'absurd' - but I'd 100% believe that one of its weapons is doing something bizarre with spawned fighters, or that it's got some kind of everyframe plugin trying to manage something and only mostly succeeding, and I know that several of its weapons do start out being available to pirates. Both times I saw the game crash, I was fighting bounty fleets. One of 'em was pirates, one of 'em was deserters - do deserter fleets get access to pirate weapon types?)
Logged
Wyvern is 100% correct about the math.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Crash on killing a Tempest
« Reply #13 on: October 09, 2022, 06:47:48 AM »

Ah, interesting, thank you for the update!

One of 'em was pirates, one of 'em was deserters - do deserter fleets get access to pirate weapon types?)

I don't believe so - deserters are spawned as "a fleet of that faction" that then gets its faction changed to pirates, but the original spawn is normal re: weapons/ships/etc.
Logged

Wispborne

  • Captain
  • ****
  • Posts: 413
  • Discord: wispborne
    • View Profile
Re: Crash on killing a Tempest
« Reply #14 on: October 20, 2022, 11:34:24 AM »

This is the same stacktrace as seen in vanilla here: https://fractalsoftworks.com/forum/index.php?topic=24937.0.

A user also reported it in a modded game on Discord and I'll attach the log (actually I'll hotlink it, didn't realize the upload limits are tiny lol). There are a few other reports of the same bug on Discord, which you can find by searching "at com.fs.starfarer.combat.ai.movement.maneuvers.Oo0O.<init>(Unknown Source)". Some of those will have logfiles attached.

Log: https://cdn.discordapp.com/attachments/619635013201428481/1032723251912257566/starsector_58.zip
Logged
Mod: Persean Chronicles | Mod Managers: SMOL & TriOS | Tool: VRAM Estimator | Tool: Forum+Discord Mod Database | If I'm inactive for 3 months, anyone can use any of my work for anything (except selling it or its derivatives).
Pages: [1] 2