Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Null pointer exception during combat  (Read 2938 times)

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Null pointer exception during combat
« on: February 24, 2012, 10:41:35 AM »

I was playing along in my test mission [with my mod, yes, but every single thing in it had been tested before; I was merely trying out some damage tweaks to a weapon] when suddenly this occurred - it appears to have been an AI glitch anyways, not an issue with anything I modded:
"938324 [Thread-6] ERROR com.fs.starfarer.combat.O0OO  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.combat.entities.A.super.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.return(Unknown Source)
   at com.fs.starfarer.combat.ai.movement.maneuvers.o00O.o00000(Unknown Source)
   at com.fs.starfarer.combat.ai.movement.maneuvers.J.o00000(Unknown Source)
   at com.fs.starfarer.combat.ai.FighterAI.int.String(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.return.ôøÒ000(Unknown Source)
   at com.fs.super.super.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.O0OO.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)"

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Null pointer exception during combat
« Reply #1 on: February 24, 2012, 10:45:39 AM »

Ok, I have a theory as to what it was:

The crash occured shortly after I ordered my carrier to retreat, and I also had fighters active in the field. Maybe when the carrier retreated, one of the wings was trying to go to it to repair? (Or was repairing at the time it retreated?)

Just a theory though, but its the only usual thing I could think of.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24118
    • View Profile
Re: Null pointer exception during combat
« Reply #2 on: February 24, 2012, 11:13:54 AM »

Yeah, that looks probable - should be fixed, at least in that it shouldn't crash there.

If it was a custom carrier, I'd also make sure it works under normal circumstances, just to be certain - it's easy to mess up a carrier .ship file to get this kind of thing when fighters try to land.
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Null pointer exception during combat
« Reply #3 on: February 24, 2012, 11:20:01 AM »

It was a custom carrier, but one thoroughly tested; its worked flawlessly in over 30 test missions with fighters refitting multiple times per battle; this was merely the first time I had ever ordered it to retreat during battle.

Sucky Jack

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Null pointer exception during combat
« Reply #4 on: February 24, 2012, 11:15:06 PM »

Went and tested this myself, trying to recreate the crash.  Was using a Venture Cruiser and Wasp Drones in an unmodded game.

If the carrier retreats at the time of an ordered refit, the fighters just ignore the order and joins the fight once more.

If the carrier retreats with the fighters in the hanger bay getting repaired, the fighters are completely destroyed.

All of the above were done with tactical orders, not the ship bound AI.  If the problem isn't with the modded ship but rather the AI itself then it would have to be caused by AI given orders.
Logged