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 653410 - Sometime at startup, there is a crash due to gtk_icon_theme_lookup_icon
Sometime at startup, there is a crash due to gtk_icon_theme_lookup_icon
Status: RESOLVED INCOMPLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-06-25 19:59 UTC by Matthieu Baerts
Modified: 2015-06-21 15:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthieu Baerts 2011-06-25 19:59:51 UTC
Hello,

Sometime but only at startup, Cairo-Dock crashes and it seems it's due to gtk_icon_theme_lookup_icon.
This is the backtrace (sorry, gtk has not been compiled with the -g option...):
   #0  0x00007ffff6eed4d7 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
   #1  0x00007ffff6eed7b9 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
   #2  0x00007ffff6ef3a38 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
   #3  0x00007ffff6ef4ba9 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
   #4  0x00007ffff6ef561a in gtk_icon_theme_lookup_icon () from /usr/lib/libgtk-x11-2.0.so.0
   #5  0x00007ffff61444d1 in cairo_dock_search_icon_s_path (cFileName=0xb09f40 "drive-harddisk-ata") at /opt/cairo-dock_bzr/cairo-dock-core/src/gldit/cairo-dock-icon-factory.c:162
   (...)

And this is the line 162 in cairo-dock-icon-factory.c:
   pIconInfo = gtk_icon_theme_lookup_icon  (GTK_ICON_THEME (pIconTheme), sIconPath->str, 128, GTK_ICON_LOOKUP_FORCE_SVG);
(or if you want to have the full file: http://bazaar.launchpad.net/~cairo-dock-team/cairo-dock-core/cairo-dock/files/head:/src/gldit/cairo-dock-icon-factory.c)

I confirm that I only have this bug at startup.
Comment 1 Matthias Clasen 2011-06-30 18:09:18 UTC
Can you install debug information for gtk and reproduce the stacktrace again, please ? All those ?? make it less useful.
Comment 2 Matthieu Baerts 2011-07-13 11:08:15 UTC
After having installed the debug information for gtk, it was hard to reproduce the crash but finally I have the backtrace:


	Program received signal SIGSEGV, Segmentation fault.
	[Switching to Thread 0x7fffd0f3b700 (LWP 2153)]
	find_image_offset (icon_name=0x97e2c0 "drive-harddisk-ata", directory_index=55, cache=<value optimized out>) at /build/buildd/gtk+2.0-2.24.5/gtk/gtkiconcache.c:246
		in /build/buildd/gtk+2.0-2.24.5/gtk/gtkiconcache.c
	#0  find_image_offset (icon_name=0x97e2c0 "drive-harddisk-ata", directory_index=55, cache=<value optimized out>) at /build/buildd/gtk+2.0-2.24.5/gtk/gtkiconcache.c:246
	#1  0x00007ffff6eed7b9 in _gtk_icon_cache_get_icon_flags (cache=0x866bd0, icon_name=<value optimized out>, directory_index=<value optimized out>) at /build/buildd/gtk+2.0-2.24.5/gtk/gtkiconcache.c:283
	#2  0x00007ffff6ef3a38 in theme_dir_get_icon_suffix (dir=<value optimized out>, icon_name=<value optimized out>, has_icon_file=0x0) at /build/buildd/gtk+2.0-2.24.5/gtk/gtkicontheme.c:2072
	#3  0x00007ffff6ef4ba9 in theme_lookup_icon (icon_theme=<value optimized out>, icon_names=0x7fffd0f3a990, size=128, flags=GTK_ICON_LOOKUP_FORCE_SVG) at /build/buildd/gtk+2.0-2.24.5/gtk/gtkicontheme.c:2135
	#4  choose_icon (icon_theme=<value optimized out>, icon_names=0x7fffd0f3a990, size=128, flags=GTK_ICON_LOOKUP_FORCE_SVG) at /build/buildd/gtk+2.0-2.24.5/gtk/gtkicontheme.c:1274
	#5  0x00007ffff6ef561a in IA__gtk_icon_theme_lookup_icon (icon_theme=0x771a30, icon_name=0x97e2c0 "drive-harddisk-ata", size=128, flags=GTK_ICON_LOOKUP_FORCE_SVG) at /build/buildd/gtk+2.0-2.24.5/gtk/gtkicontheme.c:1445
	#6  0x00007ffff61434d1 in cairo_dock_search_icon_s_path (cFileName=0x9180f0 "drive-harddisk-ata") at /opt/cairo-dock_bzr/cairo-dock-core/src/gldit/cairo-dock-icon-factory.c:162
	#7  0x00007fffe5bfd89e in _cd_get_icon_path (pIcon=0x81ac90, cTargetURI=<value optimized out>) at /opt/cairo-dock_bzr/cairo-dock-plug-ins/gvfs-integration/cairo-dock-gio-vfs.c:94
	#8  0x00007fffe5bfe11c in cairo_dock_gio_vfs_list_directory (cBaseURI=<value optimized out>, iSortType=CAIRO_DOCK_FM_SORT_BY_NAME, iNewIconsGroup=6, bListHiddenFiles=0, iNbMaxFiles=100, cValidUri=0x7fffd0f3ab40) at /opt/cairo-dock_bzr/cairo-dock-plug-ins/gvfs-integration/cairo-dock-gio-vfs.c:850
	#9  0x00007fffdc58ee05 in cd_shortcuts_list_drives (pSharedMemory=0x8f3b90) at /opt/cairo-dock_bzr/cairo-dock-plug-ins/shortcuts/src/applet-drives.c:302
	#10 0x00007fffdc58d935 in _load_icons (pSharedMemory=0x8f3b90) at /opt/cairo-dock_bzr/cairo-dock-plug-ins/shortcuts/src/applet-load-icons.c:194
	#11 cd_shortcuts_get_shortcuts_data (pSharedMemory=0x8f3b90) at /opt/cairo-dock_bzr/cairo-dock-plug-ins/shortcuts/src/applet-load-icons.c:228
	#12 0x00007ffff61a4b64 in _cairo_dock_threaded_calculation (pTask=0x915f40) at /opt/cairo-dock_bzr/cairo-dock-core/src/gldit/cairo-dock-task.c:64
	#13 0x00007ffff6444506 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
	#14 0x00007ffff798ed8c in start_thread (arg=0x7fffd0f3b700) at pthread_create.c:304
	#15 0x00007ffff5e5a1dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
	#16 0x0000000000000000 in ?? ()
	A debugging session is active.


I hope it will help you!
Comment 3 Matthieu Baerts 2011-07-16 20:58:07 UTC
Hello,

Just to note that this function (gtk_icon_theme_lookup_icon()) is called into a separated threat (but I guess this function is 'thread-safe' and it's not a problem to call this function twice at the same time).
Comment 4 Matthieu Baerts 2012-05-30 09:25:10 UTC
On Cairo-Dock we have protected this function with a mutex but without that I still have this crash with GTK+3 (3.4.2)
Comment 5 Matthieu Baerts 2012-08-03 23:06:53 UTC
Here is a new backtrace of this crash with GTK+3 (3.5.8)

----------------------
  • #0 find_image_offset
    at /build/buildd/gtk+3.0-3.5.8/./gtk/gtkiconcache.c line 252
  • #1 _gtk_icon_cache_get_icon_flags
    at /build/buildd/gtk+3.0-3.5.8/./gtk/gtkiconcache.c line 292
  • #2 theme_dir_get_icon_suffix
    at /build/buildd/gtk+3.0-3.5.8/./gtk/gtkicontheme.c line 2135
  • #3 theme_lookup_icon
    at /build/buildd/gtk+3.0-3.5.8/./gtk/gtkicontheme.c line 2198
  • #4 choose_icon
    at /build/buildd/gtk+3.0-3.5.8/./gtk/gtkicontheme.c line 1341
  • #5 gtk_icon_theme_lookup_icon
    at /build/buildd/gtk+3.0-3.5.8/./gtk/gtkicontheme.c line 1508


I hope it will be helpful :)
Comment 6 Milan Crha 2012-08-20 12:49:56 UTC
It seems to be close to bug #614800
Comment 7 Matthias Clasen 2015-06-21 15:48:21 UTC
Lets close this as one too, then.