! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[PATCH] assertion 'GTK_IS_WIDGET (widget)' failed with missing icons
Status:
RESOLVED: FIXED

Comments

Description John Lindgren editbugs 2015-07-10 19:09:31 CEST
Created attachment 6381 
Fix assertion failure

Several warnings like the following are printed out whenever the XFCE applications menu is opened:

(xfce4-panel:18392): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

The issue lies in garcon-gtk-menu.c, where garcon_gtk_menu_load_icon() returns a null pointer instead of a GtkImage when an icon is missing.  The calling code does not check for a null pointer and immediately calls gtk_widget_show() on it.

The attached patch returns a "missing icon" GtkImage instead of a null pointer when the icon was not found in the theme.  A benefit of this approach is that the correct icon should automatically appear if the icon theme is changed to one that does include the requested icon.

The patch applies cleanly to both Git master and 0.4.0.
Comment 1 Eric Koegel editbugs 2016-06-03 08:03:35 CEST
Thanks! Pushed to master in:
commit d46becb0e7989fe3befc95a72c27dd76355fb176
Author: John Lindgren <john.lindgren@aol.com>
Date:   Fri Jul 10 12:55:36 2015 -0400

    Fix assertion 'GTK_IS_WIDGET (widget)' failed.
    
    Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
http://git.xfce.org/xfce/garcon/commit/?id=d46becb0e7989fe3befc95a72c27dd76355fb176

Bug #12059

Reported by:
John Lindgren
Reported on: 2015-07-10
Last modified on: 2016-06-03

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Version:
unspecified

Attachments

Fix assertion failure (1.11 KB, patch)
2015-07-10 19:09 CEST , John Lindgren
no flags

Additional information