Incidencia #45116

dai_choose_diplomat_offensive() assert failure

Abrir Fecha: 2022-07-16 21:53 Última actualización: 2022-09-30 18:36

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
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
Comentario

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

2022-09-24 00:47 Updated by: cazfi
  • Hito Update from (Ninguno) to 3.0.4 (cerrado)
  • Componente Update from (Ninguno) to AI
Comentario

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
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
Comentario

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 Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar