Engaging an unguarded territory bug

I’ve had this happen several times to me - I will attack a planet and get an error. I can choose to continue, at which point there are no enemies to fight against. Starting the fight causes another error, which finally crashes the game. I still haven’t been able to beat the campaign due to this bug and another crash bug which I don’t know how to reproduce.

Steps to reproduce:

  1. Fight an enemy comprised mainly of fighters, maybe with a few frigates thrown in.
  2. Destroy all the frigates, then retreat from the fighters.
  3. The next turn, reengage that planet - that’s when the errors begin.

This breaks the campaign.