GNOME Bugzilla – Bug 662255
GtkGrid row/column spacing causes negative sizes with no children (crashes Glade)
Last modified: 2011-10-27 13:06:53 UTC
Created attachment 199492 [details] stdout+backtrace To reproduce this bug: 1. new Window 2. place Tree View in it (model isn't needed, click create) 3. select newly created treeview in inspector 4. click icon 'Edit...' (last in glade toolbar) 5. crash... last line from standard output (much more in attachment): Gtk-ERROR **: GtkBox child GladeEditorTable minimum height: -4 < 0 Trace/breakpoint trap Attachment hold messages from output of not stripped binary + backtrace. Ubuntu 11.10 amd64 Glade 3.10.0 (from repo)
Ah, yes... thanks for raising this. I have it with GTK+ 3.2 but not with GTK+ 3.0 I'm almost certain that this is a bug in GtkGrid which occurs when the grid has no children and has some spacing specified. It only showed up in Glade with recent versions of GTK+ because of a small api break which inverted the meaning of the row spacing and column spacing.
In any measure I'm not an expert, but I think You can be right. I commented line 66: gtk_grid_set_row_spacing (GTK_GRID (self), 4); in function static void glade_editor_table_init (GladeEditorTable * self) in file gladeui/glade-editor-table.c git describe: GLADE_3_10_2-2-gda472e7 and no more crashing, thanks.
I dont have time to fix this today and havent found time to fix it the past few days... so since I didn't fix it yet, better make sure its reported in the right bugzilla and not keep it a secret anymore... The fix is going to be very easy, the problem is obvious, the GtkGrid reports negative requests when row/column spacing is set to a positive value and there are no children.
Should be fixed by http://git.gnome.org/browse/gtk+/commit/?id=bb1d9aba86af715e5a5c53d5ad3b7dfcb720634e maybe ?
Yes great thanks. Did a quick check: Updated, no crash... un-applied your patch just to double-check (and the crash indeed comes back without your patch).
*** Bug 662845 has been marked as a duplicate of this bug. ***