GNOME Bugzilla – Bug 623603
meld built with pygtk-2.16.0 giving warnings
Last modified: 2010-10-11 03:21:42 UTC
I have build meld(http://meld.sourceforge.net/) using pygtk-2.16.0 and gtk+-2.20.1 as one of its dependencies. I am getting the below warnings when I do a directory diffing. These warnings occur only when I use pygtk-2.16.0 and not evident when I use older versions of pygtk. Can someone please quickly help me debug this issue? Command I run /usr/pkgs/meld-1.3.1/bin/meld /usr/local/etc /usr/local/bin Warnings /usr/pkgs/meld-1.3.1/lib/meld/dirdiff.py:262: GtkWarning: gtk_label_set_ellipsize: assertion `GTK_IS_LABEL (label)' failed self.filter_menu_button.set_label_widget(label) /usr/pkgs/meld-1.3.1/lib/meld/dirdiff.py:262: GtkWarning: gtk_label_set_angle: assertion `GTK_IS_LABEL (label)' failed self.filter_menu_button.set_label_widget(label) /usr/pkgs/meld-1.3.1/lib/meld/dirdiff.py:262: GtkWarning: gtk_misc_set_alignment: assertion `GTK_IS_MISC (misc)' failed self.filter_menu_button.set_label_widget(label Strace Output close(17) = 0 munmap(0x2aaaaaabc000, 4096) = 0 write(2, "/usr/pkgs/meld-1.3.1/lib/m"..., 179/usr/pkgs/meld-1.3.1/lib/meld/dirdiff.py:262: GtkWarning: gtk_label_set_ellipsize: assertion `GTK_IS_LABEL (label)' failed self.filter_menu_button.set_label_widget(label) ) = 179 write(2, "/usr/pkgs/meld-1.3.1/lib/m"..., 175/usr/pkgs/meld-1.3.1/lib/meld/dirdiff.py:262: GtkWarning: gtk_label_set_angle: assertion `GTK_IS_LABEL (label)' failed self.filter_menu_button.set_label_widget(label) ) = 175 write(2, "/usr/pkgs/meld-1.3.1/lib/m"..., 176/usr/pkgs/meld-1.3.1/lib/meld/dirdiff.py:262: GtkWarning: gtk_misc_set_alignment: assertion `GTK_IS_MISC (misc)' failed self.filter_menu_button.set_label_widget(label) ) = 176 This is reproducible always
This happen to occur when I build pygtk with latest GTK-2.20.1. These warnings does not seem to occur with older gtk.
Gtk+ started to (incorrectly) assume that all widgets set with gtk_tool_button_set_label_widget are GtkLabel(s) at this commit: http://git.gnome.org/browse/gtk+/commit/?id=dad6e734 .
Created attachment 165741 [details] [review] Stop assuming that priv->label_widget will be a GtkLabel. Please backport to 2.22
Thanks for your help here, I shall rebuild gtk with your patch and let you know. I was wrong in comment1 and these seems to occur with both gtk+-2.18.3 and gtk+-2.20.1.
Awesome. This patch has fixed my issue. I rebuilt gtk+-2.18.3 with this patch. Thanks Vizoso for your help
Review of attachment 165741 [details] [review]: Looks fine, please commit to 2.22 as well, if it applies there.
Attachment 165741 [details] pushed as 963e1ec - Stop assuming that priv->label_widget will be a GtkLabel.
*** Bug 631833 has been marked as a duplicate of this bug. ***