Ticket #42263

Console message "Gtk-WARNING gadget with negative dimensions"

Open Date: 2021-05-14 08:25 Last Update: 2022-10-10 06:01

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

Details

The following error messages appears on the console during a Freeciv S2_6 game:

(freeciv-gtk3.22:67045): Gtk-WARNING **: 01:04:49.580: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node tab owner GtkNotebook)

I saw 4 copies of this message during a test game of about 50(?) turns, lasting 20(?) minutes. 3 occurrences happened near the beginning of the game, and 1 midway through the game. I do not know what game activity provoked them.

Freeciv version: S2_6 branch, commit 9cd08cd4cbe3dc201703e3609d42723f69065cca .
Client: freeciv-gtk3.22, "Freeciv version 2.6.4+ gui-gtk-3.22", on macOS 10.13.6 High Sierra
Game: local server, Civ2Civ3 rules, AI level Normal, Hexagonal tiles, no North-South wrapping, otherwise default settings.

This obviously looks like a GTK3 name. The name "GtkNotebook" occurs 8 times in client/gui-gtk3.22/* in the S2_6 branch source code.

Sorry, this not a well-isolated bug situation. I just want to get a placeholder into the bug list, for future refinement and isolation.

Expected behaviour:

Freeciv code never draws a GTK gadget with negative dimensions. No messages like this are printed to the console during games.

Ticket History (3/11 Histories)

2021-05-14 08:25 Updated by: jdlh
  • New Ticket "Console message "Gtk-WARNING gadget with negative dimensions"" created
2021-05-14 08:29 Updated by: jdlh
  • Details Updated
2021-05-15 03:40 Updated by: alain_bkr
Comment

I have also this message on Linux (ubuntu 20.04) , with 3.0.beta1

2021-05-15 04:08 Updated by: cazfi
Comment

For example https://www.hostedredmine.com/issues/853927 is about such an error, and still open.

2022-07-04 01:23 Updated by: cazfi
Comment

Work version of #44995 applied, I got some info about appearance of that message (at least one path - there might be more than one to it)

The call chain begun from real_timer_callback() -> blink_active_unit() -> unqueue_mapview_updates().

Well, calling unqueue...() from a timer function is risky - who knows what state the UI is at that specific moment.

Comment in blink_active_unit():

/* We flush to screen directly here. This is most likely faster
* since these drawing operations are all small but may be spread
* out widely. */
2022-08-22 04:05 Updated by: cazfi
  • Milestone Update from (None) to 3.0.4 (closed)
  • Component Update from (None) to Client common
2022-08-31 11:42 Updated by: cazfi
Comment

I've been testing some changes, but am not really sure of they 1) work and 2) don't introduce other regresions.

At this point I think we wait over 3.0.4 release, and then try to fix this in the very beginning of 3.0.5 cycle, to have it in testing for the entire cycle.

2022-10-04 01:42 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2022-10-10 06:01 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed
Comment

Reply To cazfi

I've been testing some changes, but am not really sure of they 1) work and 2) don't introduce other regresions.

I think it at least reduces the frequency of the error message, so closing this ticket now that the patch has been pushed. Let's open a new ticket if there's further cases with similar error message.

Edit

Please login to add comment to this ticket » Login