Possibly related assert failure on a S3_1 (+ local patches) autogame:
in city_build_building() [../../src/server/cityturn.c::2412]: assertion 'pcity->surplus[O_SHIELD] >= 0' failed.
Reply To cazfi
Possibly related assert failure on a S3_1 (+ local patches) autogame: {{{ in city_build_building() [../../src/server/cityturn.c::2412]: assertion 'pcity->surplusO_SHIELD >= 0' failed. }}}
I don't know *exact* reason of this, but seems to be related to the mess of what upkeep gets paid pack when unit gets removed from the game. I think gold upkeep is the only form of upkeep that actually gets paid back. But even when unit dies for lack of gold, it does not pay back shields or food. Additional complication is that unit dying for lack of shields does so by "Help Wonder" or "Disband Unit Recover Production" meaning that often city's negative shield stock still gets turned positive by that death (but not as much as it should).
I'm now getting that assert failure quite regularly. Either it's recently introduced bug, or the other changes have made AI much more likely to proceed to a situation where it triggers it (in an autogame)
The assert is unrelated to the original problem after all -> split to #47938
3.0.6 clang
This one is a bit weird : the value are always (-1 billion + epsilon) * 100 , and show identical values in different random games
Count of errors :
I'll try to investigate a bit and provide saved games.