From: Benjamin Otte Date: Sat, 20 Nov 2021 15:59:50 +0000 (+0100) Subject: sizerequest: Change critical message X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~5^2~119^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=eefb6a0dd4d57a58420d7a6eb76dd95dff1d5bb3;p=gtk4.git sizerequest: Change critical message Printing the affected widget leads people to assume that it is to blame for the error. However, the widget is the object the function is being called on, not the caller. And the caller is doing it wrong. Usually the caller is the parent widget, so we could print that one, but it's only usually, it can be an issue propagating from a grandparent and it doesn't tell you from where the function is called (allocation or measuring), so you need a debugger anyway. So don't put anything there instead. --- diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c index a2a8af3f84..21ee564182 100644 --- a/gtk/gtksizerequest.c +++ b/gtk/gtksizerequest.c @@ -494,8 +494,8 @@ gtk_widget_measure (GtkWidget *widget, gtk_widget_measure (widget, OPPOSITE_ORIENTATION (orientation), -1, &min_opposite_size, NULL, NULL, NULL); if (for_size < min_opposite_size) { - g_critical ("gtk_widget_measure: assertion 'for_size >= minimum opposite size' failed for %s %p: %u >= %u", - G_OBJECT_TYPE_NAME (widget), widget, for_size, min_opposite_size); + g_critical ("gtk_widget_measure: assertion 'for_size >= minimum opposite size' failed: %u >= %u", + for_size, min_opposite_size); for_size = min_opposite_size; } }