任务单 #45116

dai_choose_diplomat_offensive() assert failure

开放日期: 2022-07-16 21:53 最后更新: 2022-09-30 18:36

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
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)

任务单历史 (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
评论

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

2022-09-24 00:47 Updated by: cazfi
  • 里程碑 Update from (无) to 3.0.4 (关闭)
  • 组件 Update from (无) to AI
评论

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
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Accepted
评论

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
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登录名