HDIAndrew / EFS

12 stars 0 forks source link

Crash when attempting to view ship stacks over a certain planet #74

Closed YeOldeEBM closed 1 year ago

YeOldeEBM commented 1 year ago

Description:

When I try to view any stacks over Cadiz in this random galaxy, the game crashes. I tried skipping to the next turn where the Fleet stack had full move points but it made no difference. I thought it might be something about the Symbiot-controlled Bulk Hauler there, but the one over Shaprut isn't causing crashes.

Expected behavior:

Viewing ship stacks doesn't cause crashes.

Actual behavior:

Viewing ship stacks over Cadiz in this situation results in crashes every time.

Game version:

1.5b5 and 1.5g1. 1.5b4 and earlier do not crash.

Steps to reproduce:

  1. Load up crashtest.sav from the attached SAV folder
  2. Go to Cadiz (northeast corner of the map) and try to view the stacks in orbit there
  3. Crash away

Even loading up the first Log Save results in crashes there. Most odd.

Additional information:

SAV.zip

Matt-Caspermeyer commented 1 year ago

I failed to check for if a unit was on the planet when computing the agility bonus from AGILITY.DAT for the Unit Dialog. This fix now checks to ensure that the unit is on the planet when computing this bonus.

Testing done

Followed the steps above and now the game no longer crashes when right clicking on a space stack over Cadiz (I'm not sure why it wasn't crashing in every case, honestly, but this fixes it for all space stacks).

It's might hope we can get this into a GC2 towards the weekend.

YeOldeEBM commented 1 year ago

So it should have been a problem for all space stacks, but wasn't? I don't know what's so special about Cadiz in this case. Baffling.