任务单 #45239

AI: assert "unit_transported()" failing

开放日期: 2022-07-26 18:59 最后更新: 2022-08-03 18:11

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
1

Details

Frequently seen with the new fantasy (not the one known by that name in earlier versions) ruleset: "unit_transported(punit)" assert in aiferry_gobyboat() is failing.

It indicates a real bug. The assert is after an attempt to load the unit to the transport. With action enablers, there's no reason to assume that such an action is possible (enabled). None of the checks done beforehand consider the possibility that action is not enabled by action enablers.

Simple fix (which we likely need to go with for now) is to replace the fc_assert() with 'return FALSE', but ultimately we will need to make AI not to plan for the impossible ferrying.

Have not tested 'return FALSE' approach yet - not sure how bad the situation is after it. It's possible that the unit then just retries to use the same transport on the next turn to the end of the game.

任务单历史 (3/5 Histories)

2022-07-26 18:59 Updated by: cazfi
  • New Ticket "AI: assert "unit_transported()" failing" created
2022-07-26 20:04 Updated by: cazfi
2022-07-26 20:14 Updated by: cazfi
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Accepted
2022-08-03 18:11 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

Please login to add comment to this ticket » 登录名