HDIAndrew / EFS

12 stars 0 forks source link

Crash when double right clicking on some units in orbit that are unspotted but their cargo is spotted #176

Open floralpond opened 10 months ago

floralpond commented 10 months ago

Description:

This issue was originally seen in EW and Overhaul MP games, but later reproduced in Vanilla. In EW and Overhaul multiplayer games, we have been seeing a lot of issues with some strange spotting behavior in orbit and on ground, where if you right click on them to see unit details the game will crash. This is very common in our current multiplayer games and very very frustrating because people will spend hours on their turn only for the game to crash.

Our general thinking is that this happens when a cargo vessel is unspotted but its contents is somehow spotted. See the below screenshot from a vanilla scenario where the Hazat Noble cargo is spotted but its Pod Ship carrier is not: image

So there are actually two issues going on here:

  1. Sometimes cargo is spotted while the carrier is unspotted (actually, a unspotted carrier should not have any spotted cargo). This can give up some competitive advantage in multiplayer if someone is trying to sneak around but their cargo is actually completely visible.
  2. When right clicking on a stack in the scenario 1, the game will crash.

Expected behavior:

  1. All cargo in an unspotted carrier should also be unspotted.
  2. Right clicking on stacks with unspotted units should not cause a crash

Actual behavior:

  1. Sometimes cargo in an unspotted carrier is spotted. (this is not ALWAYS the case, but sometimes happens)
  2. Right clicking on stacks with unspotted units causes a crash

Game version:

1.51 vanilla

Steps to reproduce:

  1. Open the attached save file orbital_spot_crash.zip
  2. Right click on the Hazat units in orbit over Kish
  3. Right click again, and the game will crash

Additional information:

I would suggest to FIRST fix issue 2, then test that we don't get a crash, then fix issue 1. Because Possibly issue 2 would never happen without issue 1, but if only issue 1 is fixed then there might be some other corner condition scenario which could cause issue 2 but is just harder to reproduce, so I'd like to make the game more crash resistant first if possible, then fix the spotting/camo issue.