Population disappear (!)

Sadly I do not have much details on how this one occured, but the pop on my production planet went down from 4.5mil to just 200k over a single turn.

I did notice some weird population movements over the days but did not pay much attention. Thought I might have been drunk. But this one is definitely happening.

When it happened, I was building 88 invasion ships. So 4,4m workers. Does look suspicious right?

Verified that when building invasions the pop doesn’t return.

Pop does start to regrow so looks like on completion is removing the pop but I don’t think I saw this in last tests.

Edit 1. Above was after building 10 or more invasions on each planet. So far have now built, 1, 4, 8 and 9 without issue.

Edit 2. Built 10 invasions but pop came back this time although planet wasn’t at full pop

Edit 3. Does look like it is linked to planet being at full pop

1 Like

So I’ve managed to track this one down, and it’s a bit annoying…

When the game is initially configured, all the commands get executed and stored in the database so that on an engine restart, they can be restored to configure the game again.

The issue here is that the reload doesn’t appear to be happening in the correct order, so take the following for IS:

On finish:

  1. remove occupied workers from storage
  2. add workers to storage

What’s happening is that those two are being flipped. The engine attempts to put the workers into storage first and fails… then removes the occupied workers, so your workers vanish.

This is visible (although not quite so bad) in other places, you can often have no occupied workers despite building something (occupied attempted to be added before workers are removed), and there’s a similar issue with Soldier creation (that has occupied workers, and creating soldiers to manage storage).

It’s fixable, but it’s taking time to track down the condition that’s causing this.