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 #853927

Gtk-WARNING "Drawing a gadget with negative dimensions" when opening report (etc?)

Added by Jacob Nevins over 2 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
gui-gtk-3
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I see this every so often.

Seen today with gui-gtk3 and gui-gtk3.22 around S2_6 7970dd439e (plus local patches). It's not 100% reliable. Not seen with gui-gtk2.

I've seen it happen when I open a new report (Cities, Messages, etc). Closing and re-opening such a tab can trigger it again. By repeatedly doing that I've reproduced it with all reports (F2-F9, F11, F12) -- it doesn't seem specific to a particular report. I can't swear it doesn't occur at other times.

Here's an example of the warning:

(freeciv-gtk3.22:26593): Gtk-WARNING **: 18:17:13.990: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node tab owner GtkNotebook)

(freeciv-gtk3.22:26593): Gtk-WARNING **: 18:17:13.993: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node tab owner GtkNotebook)

I tried running with freeciv-gtk3.22 -- --g-fatal-warnings. I can't remember what I did to provoke the warning exactly. Here was the warning:

(freeciv-gtk3.22:26614): Gtk-WARNING **: 18:17:46.893: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node tab owner GtkNotebook)

and here are highlights from the (huge) backtrace:

#0  0x00007f18e9c75c75 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f18e9c785dc in g_log_writer_default ()
    at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
...
#14 0x00007f18ea3987ea in gtk_container_propagate_draw ()
    at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
...
#69 0x00007f18ea465919 in gtk_main_do_event ()
    at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
...
#74 0x000055739aedb1f8 in unqueue_mapview_updates
    (write_to_screen=write_to_screen@entry=true)
    at /home/jtn/src/freeciv/git26/client/mapview_common.c:3129
#75 0x000055739aedb930 in refresh_unit_mapcanvas
    (punit=<optimized out>, ptile=<optimized out>, full_refresh=full_refresh@entry=false, write_to_screen=write_to_screen@entry=true)
    at /home/jtn/src/freeciv/git26/client/mapview_common.c:487
#76 0x000055739aeb1297 in blink_active_unit ()
    at /home/jtn/src/freeciv/git26/client/control.c:849
#77 0x000055739aea98c5 in real_timer_callback ()
    at /home/jtn/src/freeciv/git26/client/client_main.c:1186
#78 0x000055739ae7cd79 in timer_callback (data=<optimized out>)
    at /home/jtn/src/freeciv/git26/client/gui-gtk-3.22/gui_main.c:251
...
#82 0x00007f18e9c704c2 in g_main_loop_run ()
    at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0

This is a bit reminiscent of bug #678972. That indicated it was related to unqueue_mapview_updates(TRUE) being called too early when PAGE_GAME was being created, and to fix that it was changed to FALSE. In this backtrace, blink_active_unit() leads to unqueue_mapview_updates(TRUE). Perhaps it's similar? (I'm using the Amplio2 tileset, so I think the blink timer is firing every 0.1s or so.)

However, since this is occuring after PAGE_GAME is set up, it seems like just deferring mapview updates isn't going to work.

I don't know how to find out what UI element is causing the complaint (except that it's a "tab" of a "GtkNotebook"), so I'm not sure how to ensure that blink_active_unit() doesn't start causing updates while whatever-it-is is in an incomplete state.


Related issues

Related to Freeciv - Bug #678972: Gtk-WARNING **: Drawing a gadget with negative dimensions.Closed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Has duplicate Freeciv - Bug #857202: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (2.6.1+ (b36bc7dd48), gui-gtk-3.22)Rejected

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Jacob Nevins over 2 years ago

  • Related to Bug #678972: Gtk-WARNING **: Drawing a gadget with negative dimensions. added

#2 Updated by Jacob Nevins over 2 years ago

I've seen it happen when I open a new report

...while a unit is in focus. If no units are in focus, I haven't been able to reproduce a warning. (Consistent with the hint that blink_active_unit() is implicated.)

#3 Updated by Jacob Nevins over 2 years ago

  • Has duplicate Bug #857202: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (2.6.1+ (b36bc7dd48), gui-gtk-3.22) added

#4 Updated by Marko Lindqvist about 1 month ago

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

Being handled in https://osdn.net/projects/freeciv/ticket/42263

And latest backtrace there indicate blink_active_unit() as well.

Also available in: Atom PDF