任务单 #44847

"Wanted to cancel treaty but was unable to."

开放日期: 2022-06-17 16:35 最后更新: 2022-07-10 15:51

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

Details

There's a couple of "Wanted to cancel treaty but was unable to." messages I've not seen before in S3_1 autogame set run (still in progress) log. Those are from running with the sandbox ruleset.

The codebase on this run was not from any exact git repo revision, but it has a couple of "future" patches in testing.

I'll try to reproduce that.

任务单历史 (3/11 Histories)

2022-06-17 16:35 Updated by: cazfi
  • New Ticket ""Wanted to cancel treaty but was unable to."" created
2022-06-18 03:56 Updated by: cazfi
评论

I can reproduce this (but it takes over ten hours to run the autogame from the beginning to the point where it fails)

It's likely that the senate is blocking the treaty cancellation. I see 3 potential reasons for that (3 different bugs?). The code block above the failing one is supposed to cause revolution in case senate of the current government would try to block the action. That's just assumed to success, but it can fail at least if the revolentype prevents a new revolution on the same turn previous one finished. Also, in master the government change is not instantaneous, but will only happen on turn change.

Then there's a chance that in order to go to war, multiple levels of treaties would need to be cancelled. That's known to be buggy, even by FIXME comment in handle_diplomacy_cancel_pact(). It's possible that senate is not supposed to block the action (and thus we didn't revolt) because "has_reason_to_cancel". However, as each step of the pact cancellations is handled separately, the "has_reason_to_cancel" is no longer TRUE when one treaty has already been cancelled, and then senate blocks the second step.

2022-06-18 14:13 Updated by: cazfi
评论

None of those three identified potential causes seem to apply in that autogame.

2022-06-18 20:01 Updated by: ihnatus
评论

Hmm yes I have seen this bug with my patches but I can't see any connection with what I have done...

2022-06-19 00:03 Updated by: cazfi
评论

Seem like the root cause is that in sandbox ruleset, United Nations + Manhattan Project gives senate even to Anarchy. AI succesfully entered Anarchy, but still the senate blocks going to war.

2022-06-19 03:46 Updated by: ihnatus
评论

Reply To cazfi

Seem like the root cause is that in sandbox ruleset, United Nations + Manhattan Project gives senate even to Anarchy. AI succesfully entered Anarchy, but still the senate blocks going to war.

Likely, it's so not only in sandbox? And we are to fix it within AI code, since it probably should be possible to disable war for revolting nations?

2022-06-19 04:08 Updated by: cazfi
评论

Reply To ihnatus

And we are to fix it within AI code, since it probably should be possible to disable war for revolting nations?

Yea, I have a minor modification in test in that setup where the issue has been reproducible.

2022-07-04 03:03 Updated by: cazfi
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Accepted
  • 里程碑 Update from (无) to 3.0.3 (关闭)
  • 组件 Update from (无) to AI
2022-07-10 15:51 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

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