City report context menu asserts
Qt-client context menu from city report results in
1: in get_unittype_bonus() [../../../src/common/effects.c::834]: assertion 'pplayer != ((void *)0) && punittype != ((void *)0)' failed.
3: 0: ./client/freeciv-qt(backtrace_print+0x29) [0x55acc89dbe89]
3: 1: ./client/freeciv-qt(do_log+0xf2) [0x55acc89e17a2]
3: 2: ./client/freeciv-qt(fc_assert_fail+0x9b) [0x55acc89e19bb]
3: 3: ./client/freeciv-qt(get_unittype_bonus+0xa3) [0x55acc88f1c53]
3: 4: ./client/freeciv-qt(utype_build_shield_cost+0x35) [0x55acc89d5d95]
3: 5: ./client/freeciv-qt(get_city_dialog_production_row+0x63) [0x55acc88b7a73]
It's likely because get_city_dialog_production_row() is called with NULL city there (not only in Qt-client, but in city report of other clients as well), and that's not supported in master -> assuming only master to be affected.
#1 Updated by Marko Lindqvist over 1 year ago
- File 0043-Pass-player-parameter-for-utype_build_shield_cost.patch 0043-Pass-player-parameter-for-utype_build_shield_cost.patch added
- Status changed from New to Resolved
The problem was that utype_build_shield_cost() tries to support NULL city, but fails. Attached fix adds player parameter for it, so it can have a player even if city is NULL (and player cannot be determined from city owner)