Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #905411

City report context menu asserts

Added by Marko Lindqvist over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Client
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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: Backtrace:
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.

History

#1 Updated by Marko Lindqvist over 1 year ago

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)

#2 Updated by Marko Lindqvist over 1 year ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF