チケット #43584

edit.remove_extra() causing assert failures

登録: 2022-01-08 14:08 最終更新: 2022-02-05 05:09

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

詳細

3.0.0-beta2
For context, see this forum topic - http://forum.freeciv.org/f/viewtopic.php?f=13&t=92129 Using the sandbox ruleset, add this to script.lua

function coast_only(tile, resource)
  isOK = false
  for t in tile:square_iterate(1) do
    class = t.terrain:class_name()
    if class == "Oceanic" then
      isOK = true
      break;
    end
  end -- for tile:square_iterate
  if not isOK then
    edit.remove_extra(tile, resource)
  end
end

function coasts_only_callback()
  for tile in whole_map_iterate() do
    local resource = "Ivory"
    if tile:has_extra(resource) then
      coast_only(tile, resource)
    end
  end -- for whole_map_iterate
  return false
end

signal.connect("map_generated", "coasts_only_callback")
When run, chat log shows this many times
in dbv_isset() [../../freeciv-3.0.0/utility/bitvector.c::122]: assertion 'pdbv->vec != ((void*)0)' failed.
Please report this message at https://osdn.net/projects/freeciv/ticket/
Without edit.remove_extra(tile, resource) the problem doesn't happen.

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

2022-01-08 14:08 更新者: ddeanbrown
  • 新しいチケット "edit.remove_extra() causing assert failures" が作成されました
2022-01-08 14:42 更新者: cazfi
  • 解決法なし から 受領 に更新されました
  • マイルストーン(未割り当て) から 3.0.0 (完了済み) に更新されました
コメント

Will push this fix even to S2_6.

2022-01-21 11:57 更新者: cazfi
  • 状況オープン から 完了 に更新されました
  • 担当者(未割り当て) から cazfi に更新されました
  • 解決法受領 から 修正済み に更新されました
2022-02-05 04:43 更新者: ddeanbrown
コメント

Tested with RC1, assert errors are gone, but remove_extra() is not working.

Also tried connecting to "turn_begin" signal and running on turn 1, instead of connecting to "map_generated" signal, and saw same problem, so maybe remove_extra() got broken.

2022-02-05 05:09 更新者: cazfi
コメント

Reply To ddeanbrown

but remove_extra() is not working.

Opened a new ticket about it (this one has been closed, and even documented fixed in RC1) -> #43782

添付ファイルリスト

編集

このチケットにコメントを追加するには、ログインが必要です » ログインする