待辦事項 #44754

Fatal tileset load failure not handled in FREECIV_NDEBUG build

啟用日期: 2022-06-05 02:44 最後更新: 2022-06-26 23:49

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
1

細節

tilespec_reread() has

fc_assert_exit_msg(NULL != tileset, "Failed to re-read the currently loaded tileset.");

On FREECIV_NDEBUG builds it does not give the error message from that assert, but likely crashes in a more mysterious way. Also; clang analyzer gives warnings about those later dereferences of the NULL tileset (which is how I found this).

We should not use fc_assert there, but handle the situation also in FREECIV_NDEBUG builds.

Ticket History (3/6 Histories)

2022-06-05 02:44 Updated by: cazfi
  • New Ticket "Fatal tileset load failure not handled in FREECIV_NDEBUG build" created
2022-06-09 16:00 Updated by: cazfi
2022-06-20 23:52 Updated by: cazfi
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
2022-06-21 01:49 Updated by: cazfi
評語

Plan to push to S2_6 too, for easing work of anybody porting it to more exotic environments.

2022-06-26 23:49 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

Please login to add comment to this ticket » 登入