Ticket #45116

dai_choose_diplomat_offensive() assert failure

Date d'ouverture: 2022-07-16 21:53 Dernière mise à jour: 2022-09-30 18:36

Rapporteur:
Propriétaire:
Type:
État:
Atteints
Composant:
Priorité:
5 - moyen
Sévérité:
5 - moyen
Résolution:
Fixed
Fichier:
2

Détails

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
Commentaire

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

2022-09-24 00:47 Updated by: cazfi
  • Jalon Update from (Aucun) to 3.0.4 (atteints)
  • Composant Update from (Aucun) to AI
Commentaire

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
  • Propriétaire Update from (Aucun) to cazfi
  • Résolution Update from Aucun to Accepted
Commentaire

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
  • État Update from Ouvert to Atteints
  • Résolution Update from Accepted to Fixed

Modifier

Please login to add comment to this ticket » Connexion