Tíquete #45116

dai_choose_diplomat_offensive() assert failure

: 2022-07-16 21:53 Última Atualização: 2022-09-30 18:36

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
2

Details

On current master, with a couple of local patches (unlikely to be releavant) + custom ruleset:

0: in dai_choose_diplomat_offensive() [../../../src/ai/default/aidiplomat.c::208]: assertion '(acity->id) >= 0 && (acity->id) < (signed int) sizeof((ai->stats.diplomat_reservations).vec) * 8' failed.
3: Backtrace:
3: 0: /fast/freeciv/cazfi/trunk/src/build/server/freeciv-server(backtrace_print+0x29)
3: 1: /fast/freeciv/cazfi/trunk/src/build/server/freeciv-server(do_log+0xef)
3: 2: /fast/freeciv/cazfi/trunk/src/build/server/freeciv-server(fc_assert_fail+0x9b)
3: 3: /fast/freeciv/cazfi/trunk/src/build/server/freeciv-server(dai_choose_diplomat_offensive+0x3f3)
3: 4: /fast/freeciv/cazfi/trunk/src/build/server/freeciv-server(military_advisor_choose_build+0x30f)
3: 5: /fast/freeciv/cazfi/trunk/src/build/server/freeciv-server(dai_manage_cities+0x124d)
3: 6: /fast/freeciv/cazfi/trunk/src/build/server/freeciv-server(dai_do_last_activities+0xf2)
3: 7: /fast/freeciv/cazfi/trunk/src/build/server/freeciv-server(srv_main+0x1055)

Ticket History (3/7 Histories)

2022-07-16 21:53 Updated by: cazfi
  • New Ticket "dai_choose_diplomat_offensive() assert failure" created
2022-07-16 21:57 Updated by: cazfi
Comentário

This was on turn 3493 of the game, with acity->id 66114

2022-09-24 00:47 Updated by: cazfi
  • Marco Update from (Nenhum) to 3.0.4 (fechado)
  • Componente Update from (Nenhum) to AI
Comentário

Now seen also in S3_0 and default civ2civ3 ruleset. I think this is simply size of the diplomat_reservations being smaller than number possible city ids, and such a high city id is used here.

Looking at the code, also S2_6 seems affected.

2022-09-24 23:40 Updated by: cazfi
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
Comentário

To be applied to S2_6 too (people have been running up to quite massive games there)

2022-09-30 18:36 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Login