After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612334 - Crash in GtkRecent with gnome-icon-theme 2.29.x
Crash in GtkRecent with gnome-icon-theme 2.29.x
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkRecent
unspecified
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
Emmanuele Bassi (:ebassi)
: 612316 632989 638049 648435 660418 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-03-09 19:58 UTC by David Ronis
Modified: 2014-12-22 23:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30



Description David Ronis 2010-03-09 19:58:18 UTC
Version: 2.29.92

What were you doing when the application crashed?
Starting X after upgrading to 2.29.92.   The problem is related to gnome-icon-them 2.29.x.  Things work properly with 2.28.0.  

There's nothing specific on the consol except perhaps:
Gtk:ERROR:gtkrecentmanager.c:1935:get_icon_fallback: assertion failed: (retval != NULL)




Distribution: Slackware Slackware 12.2.0
Gnome Release: 2.29.92 2010-03-08 (GARNOME)
BugBuddy Version: 2.28.0

System: Linux 2.6.33 #56 SMP PREEMPT Fri Feb 26 12:25:14 EST 2010 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10799003
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: gnome
GTK+ Modules: gnomebreakpad

Memory status: size: 73736192 vsize: 73736192 resident: 16560128 share: 13107200 rss: 16560128 rss_rlim: 18446744073709551615
CPU usage: start_time: 1268164450 rtime: 48 utime: 44 stime: 4 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/opt/garnome-svn-2.29.5/bin/gnome-panel'

[Thread debugging using libthread_db enabled]
[New Thread 0xb60fd710 (LWP 17897)]
0xb65c414e in __waitpid_nocancel () from /lib/libpthread.so.0

Thread 1 (Thread 0xb60fd710 (LWP 17897))

  • #0 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #1 IA__g_spawn_sync
    at gspawn.c line 386
  • #2 IA__g_spawn_command_line_sync
    at gspawn.c line 700
  • #3 run_bug_buddy
    at gnome-breakpad.cc line 369
  • #4 bugbuddy_segv_handle
    at gnome-breakpad.cc line 440
  • #5 <signal handler called>
  • #6 raise
    from /lib/libc.so.6
  • #7 abort
    from /lib/libc.so.6
  • #8 IA__g_assertion_message
  • #9 IA__g_assertion_message_expr
    at gtestutils.c line 1329
  • #10 get_icon_fallback
    at gtkrecentmanager.c line 1935
  • #11 idle_populate_func
    at gtkrecentchoosermenu.c line 851
  • #12 gdk_threads_dispatch
    at gdk.c line 512
  • #13 g_idle_dispatch
    at gmain.c line 4065
  • #14 IA__g_main_context_dispatch
    at gmain.c line 1960
  • #15 g_main_context_iterate
    at gmain.c line 2591
  • #16 IA__g_main_loop_run
    at gmain.c line 2799
  • #17 IA__gtk_main
    at gtkmain.c line 1219
  • #18 main
    at main.c line 137
  • #0 __waitpid_nocancel
    from /lib/libpthread.so.0

Comment 1 Vincent Untz 2010-03-09 22:49:56 UTC
This is an assertion in the GtkRecent code.
Comment 2 Vincent Untz 2010-03-09 22:50:53 UTC
This is an assertion in the GtkRecent code.
Comment 3 Akhil Laddha 2010-03-10 03:48:23 UTC
*** Bug 612316 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Clasen 2010-03-16 15:44:42 UTC
It would be good to know which arguments were passed to gtk_icon_theme_load_icon there.
Comment 5 Jim Evins 2010-12-19 18:52:51 UTC
*** Bug 632989 has been marked as a duplicate of this bug. ***
Comment 6 Jim Evins 2010-12-28 02:42:06 UTC
*** Bug 638049 has been marked as a duplicate of this bug. ***
Comment 7 Jim Evins 2010-12-28 02:54:30 UTC
Doing a google search indicates that this bug is affecting several Gtk applications, often running in a non-GNOME environment.  I personally have had reports of it affecting glabels in kubuntu and MacOS X.

My question is this: why do this assertion at all?  Wouldn't it be more prudent to return an empty pixbuf or a hardcoded pixbuf if it cannot find a suitable icon in the default theme (a message could still be sent to the console of the problem)?  At least this way, applications don't crash, which frustrates users.
Comment 8 Emmanuele Bassi (:ebassi) 2010-12-28 16:30:15 UTC
the assertion is there because the code always assumes a fallback icon will be returned; the icon is GTK_STOCK_FILE or GTK_STOCK_DIRECTORY, depending on the MIME type, and the icons pointed by these two stock items should be provided by gtk+ itself. this is the code in case:

  icon_theme = gtk_icon_theme_get_default ();
  retval = gtk_icon_theme_load_icon (icon_theme, icon_name,
                                     size,
                                     GTK_ICON_LOOKUP_USE_BUILTIN,
                                     NULL);
  g_assert (retval != NULL);

if the fallback icon has not been found it means that there is a problem in how gtk+ and/or the icon theme have been installed, or that there has been an incompatible change in gtk+.
Comment 9 drboots 2010-12-29 13:11:18 UTC
Removing any trace I can find of recent glabels activity (this was the app which crashed) does not solve the problem. I don't know how GtkRecentManager works but I had assumed from reading what it's supposed to do that a fresh installation of the app in question would at least allow me to start the app once. Do you have any other ideas I could try? or is there any other information you'd like from me?
Comment 10 Andreas Frisch 2011-02-24 17:22:10 UTC
I have the same problems with glabels
It happens every time now after I once tried saving a layout.
Deinstallation / Reinstallation didn't solve the problem either.
I am working with kubuntu.
Comment 11 Jim Evins 2011-02-25 02:33:19 UTC
=============
The following is a workaround in kubuntu 10.10 (assuming the oxygen theme):

- install gnome-icon-theme
- in /usr/share/icons/oxygen/16x16/mimetypes do a symbolic link to

   ../../../gnome/16x16/mimetypes/gtk-file.png

- run update-icon-caches on /usr/share/icons/oxygen

=============
The following is the commit that seems to have caused the problem:

From 5c74a696d5c1593be0f6b801cb85a4baf1087883 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Tue, 31 Aug 2010 04:34:24 +0000
Subject: Make stock icons use standard icon names

At least where standard names are available, instead of relying
on a symlink forest in the icon theme directory. For directional
variants, we look up icons by the pair ("foo-rtl", "foo") or
("foo-ltr", "foo"). See bug 626474.


This patch renames the gtk-file.png to document-x-generic.png

=============
I think the following commit in master would actually fix the problem, but this has not been applied to the 2.22 branch, so it has not made it out to the distributions:

From dbdc9c99e5f6d9e4d31567bfa78c864aa9354ab4 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Wed, 13 Oct 2010 14:18:03 +0000
Subject: Make GtkRecentManager use standard icon names for themed icons

---
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c
index 5f5c012..c14f9e5 100644
--- a/gtk/gtkrecentmanager.c
+++ b/gtk/gtkrecentmanager.c
@@ -1912,9 +1912,9 @@ gtk_recent_info_get_icon (GtkRecentInfo *info,
     {
       if (info->mime_type &&
           strcmp (info->mime_type, "x-directory/normal") == 0)
-        retval = get_icon_fallback (GTK_STOCK_DIRECTORY, size);
+        retval = get_icon_fallback ("folder", size);
       else
-        retval = get_icon_fallback (GTK_STOCK_FILE, size);
+        retval = get_icon_fallback ("document-x-generic", size);
     }
   
   return retval;
Comment 12 Andreas Frisch 2011-02-25 08:03:24 UTC
Dear Jim,

thanks for the hint! this worked for me
Comment 13 Jim Evins 2011-04-22 02:54:09 UTC
*** Bug 648435 has been marked as a duplicate of this bug. ***
Comment 14 Jim Evins 2011-09-29 12:17:28 UTC
*** Bug 660418 has been marked as a duplicate of this bug. ***
Comment 15 Matthias Clasen 2014-12-22 23:47:22 UTC
I assume its fixed