Shortcuts applet causing continous restarts of Dock

Bug #1382796 reported by nick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cairo-Dock Plug-ins
Fix Committed
Medium
Matthieu Baerts

Bug Description

============================================================================
        Cairo-Dock version : 3.4.0
        Compiled date : Oct 17 2014 09:05:35
        Built with GTK : 3.14
        Running with OpenGL: 1
 ============================================================================

This is an ssue with the Shortcuts applet (bzr plugins).

STEPS TO REPRODUCE:
1. Load Cairo dock with default Panel
2. Delete one of the folders / files referenced by the Shortcuts plugin.
3. Restart cairo-dock

It will seg fault and continue trying to restart. Seems impossible to change the theme and get the dock working again. Attempting to run the current theme will revert to default dock and so will not fix the problem.

Issue occurs in applet-bookmarks.c -> cd_shortcuts_list_bookmarks (specifically it is reading .gtk-bookmarks and falling over when it cannot find the file referenced by the bookmarks).

Emptying .gtk-bookmarks is a workaround to resolve the issue.

STACK TRACE OF WHERE THE EVENT HAPPENSj:
(gdb) backtrace
#0 cd_shortcuts_list_bookmarks (cBookmarkFilePath=cBookmarkFilePath@entry=0x7fffc00199d0 "/home/nick/.gtk-bookmarks", myApplet=0xec48c0)
    at /var/abs/local/yaourtbuild/cairo-dock-plugins-bzr/src/cairo-dock-plug-ins/shortcuts/src/applet-bookmarks.c:415
#1 0x00007fffd121b2e1 in _load_icons (pSharedMemory=0xed5460)
    at /var/abs/local/yaourtbuild/cairo-dock-plugins-bzr/src/cairo-dock-plug-ins/shortcuts/src/applet-load-icons.c:266
#2 cd_shortcuts_get_shortcuts_data (pSharedMemory=0xed5460)
    at /var/abs/local/yaourtbuild/cairo-dock-plugins-bzr/src/cairo-dock-plug-ins/shortcuts/src/applet-load-icons.c:277
#3 0x00007ffff6311710 in _get_data_threaded (pTask=0xe93340) at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-task.c:136
#4 0x00007ffff74a0585 in ?? () from /usr/lib/libglib-2.0.so.0
#5 0x00007ffff521c314 in start_thread () from /usr/lib/libpthread.so.0
#6 0x00007ffff5fcf3ed in clone () from /usr/lib/libc.so.6
(gdb)

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Hello and thank you for this bug report!

Is it maybe possible to get a "full backtrace" of this crash? ==> 'backtrace full' instead of 'backtrace'
For more details about gdb: http://wiki.glx-dock.org/?p=ddd

affects: cairo-dock-core → cairo-dock-plug-ins
Changed in cairo-dock-plug-ins:
status: New → Incomplete
description: updated
Revision history for this message
Matthieu Baerts (matttbe) wrote :
Revision history for this message
Matthieu Baerts (matttbe) wrote :

And is it maybe possible to get the content of your .gtk-bookmarks file? :-)

Revision history for this message
nick (thedarkstuff) wrote :

Here is the .gtk-bookmarks causing the issue.

Revision history for this message
nick (thedarkstuff) wrote :
Download full text (8.7 KiB)

(gdb) backtrace full
#0 cairo_dock_search_icon_s_path (cFileName=0xffffffff <error: Cannot access memory at address 0xffffffff>, iDesiredIconSize=70)
    at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-icon-manager.c:229
No locals.
#1 0x00007ffff62b6665 in _load_image (icon=0x7fffc001d340) at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-icon-manager.c:946
        cIconPath = <optimized out>
        iWidth = 70
        iHeight = 70
        pSurface = 0x0
#2 0x00007ffff62b6d99 in cairo_dock_load_icon_image (icon=icon@entry=0x7fffc001d340, pContainer=pContainer@entry=0x1240db0)
    at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-icon-factory.c:122
        __PRETTY_FUNCTION__ = "cairo_dock_load_icon_image"
        pInstance = 0x0
        __func__ = "cairo_dock_load_icon_image"
        pPrevSurface = 0x0
        iPrevTexture = 0
#3 0x00007ffff62b7337 in _load_icon_buffer_idle (pIcon=0x7fffc001d340)
    at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-icon-factory.c:260
        pContainer = 0x1240db0
#4 0x00007ffff747992d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#5 0x00007ffff7479d08 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6 0x00007ffff747a032 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#7 0x00007ffff6a05a85 in gtk_main () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#8 0x000000000040f00d in main (argc=2, argv=0x7fffffffe6e8) at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/cairo-dock.c:920
        i = 0
        erreur = 0x0
        bSafeMode = 0
        bMaintenance = 0
        bNoSticky = 0
        bCappuccino = 0
        bPrintVersion = 0
        bTesting = 0
        bForceOpenGL = 0
        bToggleIndirectRendering = 0
        bKeepAbove = 0
        bForceColors = 0
        bAskBackend = 0
        bMetacityWorkaround = 0
        cEnvironment = 0x0
        cUserDefinedDataDir = 0x0
        cVerbosity = 0x0
        cUserDefinedModuleDir = 0x0
        cExcludeModule = 0x0
        cThemeServerAdress = 0x0
        iDelay = 0
        pOptionsTable = {{long_name = 0x4255f2 "cairo", short_name = 99 'c', flags = 2, arg = G_OPTION_ARG_NONE, arg_data = 0x632e40 <g_bForceCairo>,
            description = 0x7fffe88a82bd "Use Cairo backend.", arg_description = 0x0}, {long_name = 0x425662 "opengl", short_name = 111 'o', flags = 2,
            arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffe084, description = 0x7fffe88a8336 "Use OpenGL backend.", arg_description = 0x0}, {
            long_name = 0x425659 "indirect-opengl", short_name = 79 'O', flags = 2, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffe088,
            description = 0x7fffe88a82d0 "Use OpenGL backend with indirect rendering. There are very few case where this option should be used.",
            arg_description = 0x0}, {long_name = 0x425669 "ask-backend", short_name = 65 'A', flags = 2, arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffe094,
            description = 0x7fffe88a0f7...

Read more...

Revision history for this message
nick (thedarkstuff) wrote :

That was an updated bookmarks file - sorry about that. Here is the bookmarks file for the original crash.

Changed in cairo-dock-plug-ins:
status: Incomplete → Triaged
Revision history for this message
Matthieu Baerts (matttbe) wrote :

It seems your second backtrace is not for the same crash as the previous one.
What did you do to have this crash? Is it linked to this bug?

Thank you for your .gtk-bookmarks. How did you edit it? By dropping a directory into the Shortcut's subdock?

Revision history for this message
nick (thedarkstuff) wrote :

Actually, the original issue was caused by a shortcut to a conkyrc file. I was clearing up my home directory and deleted the .conky directory. Then I loaded up Cairo Dock and it fell over because the target of the link no longer existed.

Revision history for this message
Matthieu Baerts (matttbe) wrote :

> a shortcut to a conkyrc file

Do you mean a symbolic link? Because I'm not able to reproduce this crash.

Note that this .gtk-bookmarks file should no longer be used. A 'bookmarks' file should now be available in this dir: ~/.config/gtk-3.0/

Revision history for this message
nick (thedarkstuff) wrote :

Matthieu - sorry about that. I can now see the steps to reproduce and what caused the original problem.

I had originally used another file manager called pcmanfm before moving to KDE. This file manager uses .gtk-bookmarks for it's bookmarking.

STEPS TO REPRODUCE:
1. Create folder in home directory - test2
2. In pcmanfm you can bookmark this file adding the following entry into .gtk-bookmarks
file:///home/nick/test2 test2
3. Delete the actual folder that the bookmark file refers to.
4. Load Cairo Dock (Default Panel with Shortcuts applet).

It now begins restarting.

arning : (/var/abs/local/yaourtbuild/cairo-dock-plugins-bzr/src/cairo-dock-plug-ins/kde-integration/src/applet-vfs.c:vfs_backend_get_file_info:304)
  gnome_integration : Error when getting information for file '/home/nick/test2': No such file or directory
warning : (/var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/cairo-dock.c:_cairo_dock_intercept_signal:180)
  Cairo-Dock has crashed (sig 11).
It will be restarted now.
Feel free to report this bug on glx-dock.org to help improving the dock!
info on the system :
Linux Cuchulainn 3.16.4-1-ARCH #1 SMP PREEMPT Mon Oct 6 08:22:27 CEST 2014 x86_64 GNU/Linux
Couldn't guess if it was an applet's fault or not. It may have crashed inside the core or inside a thread
restarting with 'cairo-dock -w 2 -q 2'...

The thunar file manager also stores bookmarks in .gtk-bookmarks and can be used to re-create the issue.

Revision history for this message
nick (thedarkstuff) wrote :

I have also re-created this issue using the nautilus file browser:

1. Create folder foo
2. Add bookark in nautilus to foo (this creates the entry file:///home/nick/foo in /home/nick/.config/gtk-3.0/bookmarks
3. Delete folder foo
4. Start cairo dock with default dock (and shortcuts icon).

warning : (/var/abs/local/yaourtbuild/cairo-dock-plugins-bzr/src/cairo-dock-plug-ins/kde-integration/src/applet-vfs.c:vfs_backend_get_file_info:304)
  gnome_integration : Error when getting information for file '/home/nick/foo': No such file or directory
warning : (/var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/cairo-dock.c:_cairo_dock_intercept_signal:180)
  Cairo-Dock has crashed (sig 11).
It will be restarted now.
Feel free to report this bug on glx-dock.org to help improving the dock!
info on the system :
Linux Cuchulainn 3.16.4-1-ARCH #1 SMP PREEMPT Mon Oct 6 08:22:27 CEST 2014 x86_64 GNU/Linux
Couldn't guess if it was an applet's fault or not. It may have crashed inside the core or inside a thread
restarting with 'cairo-dock -w 2 -q 2'...

Revision history for this message
Matthieu Baerts (matttbe) wrote :

I see that you're using kde-integration plugin.
Do you have this bug if you force the use of the gnome-integration plugin?

    $ cairo-dock -e gnome

Is it possible to have a (full) backtrace of this crash? :-)

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Even when I force the use of the kde-integration plugin, I'm not able to reproduce this crash :-/

Revision history for this message
nick (thedarkstuff) wrote :
Download full text (8.8 KiB)

Matthieu - strange...maybe something weird in my environment.

Here is the contents of gtk-bookmarks:
file:///home/nick/test2
I added the bookmark using pcmanfm.

I then removed the directory the bookmark refers to (using rmdir).

Here's the full backtrace of cairo-dock -e gnome

gdb) backtrace full
#0 cairo_dock_search_icon_s_path (cFileName=0xffffffff <error: Cannot access memory at address 0xffffffff>, iDesiredIconSize=70)
    at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-icon-manager.c:229
No locals.
#1 0x00007ffff62b6665 in _load_image (icon=0x7fffc001e270) at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-icon-manager.c:946
        cIconPath = <optimized out>
        iWidth = 70
        iHeight = 70
        pSurface = 0x0
#2 0x00007ffff62b6d99 in cairo_dock_load_icon_image (icon=icon@entry=0x7fffc001e270, pContainer=pContainer@entry=0x18deb30)
    at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-icon-factory.c:122
        __PRETTY_FUNCTION__ = "cairo_dock_load_icon_image"
        pInstance = 0x0
        __func__ = "cairo_dock_load_icon_image"
        pPrevSurface = 0x0
        iPrevTexture = 0
#3 0x00007ffff62b7337 in _load_icon_buffer_idle (pIcon=0x7fffc001e270) at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-icon-factory.c:260
        pContainer = 0x18deb30
#4 0x00007ffff747992d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#5 0x00007ffff7479d08 in ?? () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6 0x00007ffff747a032 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#7 0x00007ffff6a05a85 in gtk_main () from /usr/lib/libgtk-3.so.0
No symbol table info available.
#8 0x000000000040f00d in main (argc=1, argv=0x7fffffffe5f8) at /var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/cairo-dock.c:920
        i = 0
        erreur = 0x0
        bSafeMode = 0
        bMaintenance = 0
        bNoSticky = 0
        bCappuccino = 0
        bPrintVersion = 0
        bTesting = 0
        bForceOpenGL = 0
        bToggleIndirectRendering = 0
        bKeepAbove = 0
        bForceColors = 0
        bAskBackend = 0
        bMetacityWorkaround = 0
        cEnvironment = 0x0
        cUserDefinedDataDir = 0x0
        cVerbosity = 0x0
        cUserDefinedModuleDir = 0x0
        cExcludeModule = 0x0
        cThemeServerAdress = 0x0
        iDelay = 0
        pOptionsTable = {{long_name = 0x4255f2 "cairo", short_name = 99 'c', flags = 2, arg = G_OPTION_ARG_NONE, arg_data = 0x632e40 <g_bForceCairo>,
            description = 0x7fffe88a82bd "Use Cairo backend.", arg_description = 0x0}, {long_name = 0x425662 "opengl", short_name = 111 'o', flags = 2, arg = G_OPTION_ARG_NONE,
            arg_data = 0x7fffffffdf94, description = 0x7fffe88a8336 "Use OpenGL backend.", arg_description = 0x0}, {long_name = 0x425659 "indirect-opengl", short_name = 79 'O', flags = 2,
            arg = G_OPTION_ARG_NONE, arg_data = 0x7fffffffdf98,
            description = 0x7fffe88a82d0 "Use OpenGL backend with in...

Read more...

Revision history for this message
nick (thedarkstuff) wrote :

Ah - Matthieu - you were right - forcing gnome integration fixed it!

I ran the previous gdb session without passing the args correctly i.e.
gdb cairo-dock -e gnome instead of supplying them inside gdb (have not used gdb in a long long while).

Here is the trace with it working
(gdb) run -e gnome
Starting program: /usr/bin/cairo-dock -e gnome
Got object file from memory but can't read symbols: File truncated.
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe90ab700 (LWP 21792)]
warning : (/var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/implementations/cairo-dock-egl.c:gldi_register_egl_backend:232)
  Cairo-Dock was not built with EGL support
warning : (/var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/implementations/cairo-dock-glx.c:_initialize_opengl_backend:129)
  couldn't find an appropriate visual, trying to get one without Stencil buffer
(it may cause some little deterioration in the rendering) ...

 ============================================================================
        Cairo-Dock version : 3.4.0
        Compiled date : Oct 17 2014 09:05:35
        Built with GTK : 3.14
        Running with OpenGL: 1
 ============================================================================

warning : (/var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-utils.c:cairo_dock_launch_command_sync_with_stderr:260)
  No value set for `/desktop/gnome/interface/font_name'

[New Thread 0x7fffcfe6b700 (LWP 21796)]
[Thread 0x7fffcfe6b700 (LWP 21796) exited]
warning : (/var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-keybinder.c:init_object:358)
  Couldn't bind '<Control>F12' (Log out: Show the logout menu)
 This shortkey is probably already used by another applet or another application
[New Thread 0x7fffcfe6b700 (LWP 21799)]
warning : (/var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-keybinder.c:init_object:358)
  Couldn't bind '<Control>F1' (Applications Menu: Show/hide the Applications menu)
 This shortkey is probably already used by another applet or another application
warning : (/var/abs/local/yaourtbuild/cairo-dock-bzr/src/cairo-dock-core/src/gldit/cairo-dock-keybinder.c:init_object:358)
  Couldn't bind '<Control>F2' (Applications Menu: Show/hide the quick-launch dialogue)
 This shortkey is probably already used by another applet or another application
Cairo-Dock - Launcher API Daemon is already running (18643)
[New Thread 0x7fffccca6700 (LWP 21802)]
[New Thread 0x7fffc7fff700 (LWP 21803)]
[Thread 0x7fffccca6700 (LWP 21802) exited]
[New Thread 0x7fffccca6700 (LWP 21806)]
[Thread 0x7fffc7fff700 (LWP 21803) exited]
_get_desktop_bg_surface: assertion 'iRootPixmapID != 0' failed
warning : (/var/abs/local/yaourtbuild/cairo-dock-plugins-bzr/src/cairo-dock-plug-ins/switcher/src/applet-load-icons.c:cd_switcher_load_desktop_bg_map_surface:197)
  couldn't get the wallpaper

Changed in cairo-dock-plug-ins:
importance: Undecided → Medium
assignee: nobody → Matthieu Baerts (matttbe)
milestone: none → 3.4.1
Revision history for this message
Matthieu Baerts (matttbe) wrote :

Hello,

This bug should now be fixed thanks to this commit: https://github.com/Cairo-Dock/cairo-dock-plug-ins/commit/d26cf94a2475a081b6a6c6ad678e5f4825a9246a

But it can be interesting to use GVFS as most as possible and to remove some specific hacks created for KDE (if KDE has now a better support of GVFS).

Is it maybe possible to list on a new bug report all problems that you have when using the dock without the KDE integration plugin:

    $ cairo-dock -e gnome

With this option, the dock should use GVFS without "hacks". GVFS is used to get informations about files and default applications: list files in the Trash, open your default files manager to see the content of the trash, list all disks which are mounted and unmounted, list files in a directory, etc.
In other words, do you have some problem with Shortcuts, Dustbin, Folder and Quick-Browsers applets when using this option? :-)

Changed in cairo-dock-plug-ins:
status: Triaged → Fix Committed
Revision history for this message
nick (thedarkstuff) wrote :

Matthieu, I rebuilt the fix. I now cannot re-create the issue. Good work! I will continue testing and see if I can find anymore issues without the KDE integration plugin.

Revision history for this message
Matthieu Baerts (matttbe) wrote :

Thank you for your help ;-)

Revision history for this message
Jason Dalmond (jason-ca) wrote :

Hello, just in case, wanted to add myself to the list of victims :-D
The same latest Cairo Dock 3.4.0 on KDE, Arch Linux x86-64. I encountered the bug when tried to remove Shortcuts applet after the first Cairo Dock start up. As I right clicked the applet and clicked Shortcuts -> Remove, Cairo-Dock crashed. The same again and again.
However, running "cairo-dock -e gnome" did the trick and allowed me to remove it and restart normally.
Thank you very much!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.