GNOME Bugzilla – Bug 660139
GtkGrid gives Gtk-Warnings about negative sizes when empty
Last modified: 2012-01-03 08:34:21 UTC
I get this warning when trying to display a contact: Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -4 and height 0 Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff16fb66c in g_logv (log_domain=0x7ffff79101f7 "Gtk", log_level=G_LOG_LEVEL_WARNING, format=0x7ffff7911ed0 "gtk_widget_size_allocate(): attempt to allocate widget with width %d and height %d", args1=0x7fffffffa7f0) at gmessages.c:570 570 G_BREAKPOINT (); (gdb) bt
+ Trace 228578
This seems like a GtkGrid bug. Attaching a patch
Created attachment 199535 [details] [review] Fix natural/min widht calculations for empty grids.
Review of attachment 199535 [details] [review]: Good catch.
The following fix has been pushed: bb1d9ab Fix natural/min widht calculations for empty grids
Created attachment 199698 [details] [review] Fix natural/min widht calculations for empty grids
It would be nice if this could be finally resolved and merged into master as suggested in link below, since on Arch I still suffer this crash even though I have newest gtk-3.2.3 https://bugs.archlinux.org/task/27708?string=glade&project=1&type[0]=&sev[0]=&pri[0]=&due[0]=&reported[0]=&cat[0]=&status[0]=open&percent[0]=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=
I added a reftest for this and pushed reftest and this fix to the 3.2 branch.
*** Bug 665862 has been marked as a duplicate of this bug. ***