GNOME Bugzilla – Bug 729607
GtkAboutDialog: gtk aborts when trying to show an about dialog
Last modified: 2014-05-06 03:14:23 UTC
Created attachment 275924 [details] Test case The problem is in GtkViewport reporting a wrong size. (a.out:19508): Gtk-CRITICAL **: _gtk_widget_get_preferred_size_for_size: assertion 'size >= -1' failed (a.out:19508): Gtk-WARNING **: GtkViewport 0x1a7e130 reported min size 27779380 and natural size 4 in get_preferred_width(); natural size must be >= min size (a.out:19508): Gtk-CRITICAL **: _gtk_widget_get_preferred_size_for_size: assertion 'size >= -1' failed (a.out:19508): Gtk-WARNING **: GtkViewport 0x1a7e130 reported min size 27779380 and natural size 4 in get_preferred_height(); natural size must be >= min size (a.out:19508): Gdk-WARNING **: Native Windows wider or taller than 32767 pixels are not supported Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. ** Gdk:ERROR:gdkcairo.c:193:gdk_cairo_surface_paint_pixbuf: assertion failed: (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_RGB24 || cairo_image_surface_get_format (surface) == CAIRO_FORMAT_ARGB32) Aborted
Created attachment 275925 [details] [review] Proposed patch The problem was introduced in commit 29a4f0131e7f2a8ec3c0e4949d00dfed255d5995 calling _gtk_widget_get_preferred_size_for_size() with a size lower than -1 The patch removes the checks and let any negative value mean the size it not set rather than just -1.
I fixed GtkViewport to not go below -1. I don't think it's a good idea to allow any negative number in size request code. We want to keep -1 as the only value for "undefined".
OK great, yeah that was my first approach too, but then Matthias and I tough It might be good to accept any negative value.