Ticket #43823

city display doesn't show > 30 workers

Open Date: 2022-02-08 11:41 Last Update: 2022-02-21 19:50

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
4

Details

3.0.0-RC1 Seen with freeciv-gtk3.22 client, maybe others? Seen with expanded city radius. To repro, use sandbox ruleset, edit effects.ruleset to add

[effect_city_radius_1]
type    = "City_Radius_Sq"
value   = 5

[effect_aqueduct_base]
type    = "Size_Adj"
value   = 40

See screenshot, which was hacked in editing mode. Problem starts when pop > 30, prevents changing specialists.

Ticket History (3/10 Histories)

2022-02-08 11:41 Updated by: ddeanbrown
  • New Ticket "city display doesn't show > 30 workers" created
2022-02-08 11:43 Updated by: ddeanbrown
  • Component Update from (None) to Gtk3.22-client
  • Details Updated
2022-02-11 04:40 Updated by: alienvalkyrie
  • Owner Update from (None) to alienvalkyrie
  • Milestone Update from (None) to 3.0.1 (closed)
Comment

Also present in the newer branches, and based on what the code looks like, almost certainly affects all the other gtk clients as well.

I'm not sure if this is the kind of show-stopping bug worth pushing into 3.0.0 directly before release – I would venture a guess and say that at that city size, most people are more likely to use the citizen governor and cities dialog, rather than counting specialists by hand, so it might not be that critical. But I'm open for input.

Note: It doesn't actually prevent changing the specialists, it just doesn't draw them correctly; clicking the empty space does change the specialist correctly (tho ofc it's hard to see what's going on).

The problem most likely stems from a rectangle ending up with negative width – I'm looking into it. It seems like there might be other minor issues with the relevant code as well (such as not drawing the last citizen in full).

2022-02-11 07:10 Updated by: alienvalkyrie
  • Resolution Update from None to Accepted
Comment

Note that not all of these patches are fully tested yet. In particular, I can't currently build the gtk4 clients on my system. However, since the relevant code is literally identical between all seven branch/client combinations, I'd be surprised if any of them don't work correctly.

2022-02-19 03:40 Updated by: alienvalkyrie
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed
2022-02-21 19:50 Updated by: cazfi
Comment

Reply To alienvalkyrie

I can't currently build the gtk4 clients on my system. However, since the relevant code is literally identical between all seven branch/client combinations

gtk4-client isn't in working condition, so there would be nothing to test beyond compiling with it. And CI does that, for macOS (we don't have gtk4 libraries for ubuntu runners).

You can test that before pushing the commit to freeciv/freeciv repo by having your own clone of freeciv repo on github, enabling CI on that, and pushing there.

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login