任务单 #44461

citizen_set segfault with alien/alio

开放日期: 2022-04-25 07:10 最后更新: 2022-04-28 08:10

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

Details

Starting alien ruleset game, accepting the tileset suggestion (don't know if it's relevant that the tileset was not correct one to begin with), and then trying to add an ocean city in editor mode (maybe relevant: in my tests the only ocean tiles revealed by initial vision radius were under FoW) -> client crash.

get_citizen_sprite (t=0x55555d485e50, type=CITIZEN_CONTENT, citizen_index=<optimized out>,

pcity=pcity@entry=0x55555e42ec00) at ../../../src/client/tilespec.c:6516

6516 if (graphic == NULL || graphic->count == 0) {

任务单历史 (3/8 Histories)

2022-04-25 07:10 Updated by: cazfi
  • New Ticket "citizen_set segfault with alien/alio" created
2022-04-25 15:59 Updated by: cazfi
评论

(At least part of) the problem seems to be in that citizen sets stuff is not initialized as the ruleset loads (number of city styles get set etc), if it had not been available at the time tileset was loaded ( tilespec_reread() was not able to set that stuff up )

2022-04-25 20:24 Updated by: cazfi
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Accepted
2022-04-25 21:23 Updated by: cazfi
  • 处理结果 Update from Accepted to
评论

The current patch breaks the opposite, and more common case, that the ruleset is *not* sent after tileset load.

2022-04-25 21:33 Updated by: cazfi
  • 处理结果 Update from to Accepted
评论

Reply To cazfi

The current patch breaks the opposite, and more common case, that the ruleset is *not* sent after tileset load.

That was because of tileset_setup_city_tiles() refusing to handle anything but the current last style - when style count has already gone up there was no handling earlier ones.

Attached patch is a quick fix. No refactoring for that design at this point. Should work for both cases now.

2022-04-28 08:10 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

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