チケット #42988

Assert 'state == TECH_UNKNOWN' failing

登録: 2021-10-06 20:58 最終更新: 2021-11-19 01:42

報告者:
担当者:
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
修正済み
ファイル:
1

詳細

I have a codebase forked from the master summer -19. So far in my debugging I've not seen any difference between current master and this forked codebase that would make current master safe from the assert.

I'm regularly seeing assert 'state == TECH_UNKNOWN' from research_update() failing on a client, with global observer. With my debugging attempts (increased logging from a game to game, really) I think:
- State is actually 'TECH_PREREQS_KNOWN', and that's correct
- There should be no rules preventing researching the tech, so 'reachable' should be TRUE, causing code to go in the different branch in previous 'if' (assert is in the 'else' branch)
- 'reachable' seems to be FALSE because research_may_become_allowed() macro returns FALSE -> research_allowed() returns FALSE
- reqs_may_activate() has never in the entire run returned FALSE
- As far as I see this leaves only the possibilities for the research_allowed() to return FALSE because advance is not valid (it should not be, they have valid name at least), or that research_players_iterate() iterates over zero players (as the first iterated player would cause it to return TRUE from reqs_may_activate() )

チケットの履歴 (6 件中 3 件表示)

2021-10-06 20:58 更新者: cazfi
  • 新しいチケット "Assert 'state == TECH_UNKNOWN' failing" が作成されました
2021-10-07 23:11 更新者: cazfi
コメント

Still investigating, but the issue seem to be with this code in (server side) end_turn():

researches_iterate(presearch) {
send_research_info(presearch, NULL);
} researches_iterate_end;

Similar code exist in send_all_info(), which probably causes similar issue.

researches_iterate() iterate over *all* researches, including those that have only dead players. That means that a dead player's research gets sent to the client. That research_players_iterate() on client side discussed earlier will skip dead players, so for a dead player's research it iterates over zero players, which I already assumed to be the problem.

I'm not yet sure what the correct fix would be, or even if it should be server side (never to send dead player's research), or client side (somehow to handle dead player's research).

(編集済, 2021-10-07 23:12 更新者: cazfi)
2021-10-21 06:52 更新者: cazfi
  • マイルストーン(未割り当て) から 3.0.0 (完了済み) に更新されました
  • コンポーネント(未割り当て) から General に更新されました
2021-11-08 06:10 更新者: cazfi
  • 解決法なし から 受領 に更新されました
2021-11-19 01:42 更新者: cazfi
  • 状況オープン から 完了 に更新されました
  • 担当者(未割り当て) から cazfi に更新されました
  • 解決法受領 から 修正済み に更新されました

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする