Do

Docky trash applet doesn't check if trash exists

Bug #323453 reported by Peterson Silva
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Do
Fix Released
Medium
Unassigned

Bug Description

Docky's trash applet doesn't check if ~/.local/share/Trash/files exists. This will happen if (a) the user has never deleted a file, or (b) the user does not use an XDG-compliant trash implementation. If either of these is the case, Docky will crash on startup.

Original report:
Just tested the new 0.8 release in Xubuntu 8.10 (fresh install, first thing I installed was Do, hehe).

Unfortunately, I can't start Do in Docky mode. It starts and then a few seconds later it disappears. I haven't activated any plugins.

The output from terminal:

peterson@Testing-Marvin:~$ gnome-do

(Do:10699): Wnck-WARNING **: Property _NET_WM_NAME contained invalid UTF-8

Could not read Gnome Bookmarks file /home/peterson/.gtk-bookmarks: Could not find file "/home/peterson/.gtk-bookmarks".
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.IO.DirectoryNotFoundException: Directory '/home/peterson/.local/share/Trash/files' not found.
  at System.IO.Directory.GetFileSystemEntries (System.String path, System.String pattern, FileAttributes mask, FileAttributes attrs) [0x00000]
  at System.IO.Directory.GetFiles (System.String path, System.String pattern) [0x00000]
  at System.IO.Directory.GetFiles (System.String path) [0x00000]
  at Docky.Interface.TrashDockItem.GetSurfacePixbuf () [0x00000]
  at Docky.Interface.BaseDockItem.MakeIconSurface (Cairo.Surface similar) [0x00000]
  at Docky.Interface.BaseDockItem.GetIconSurface (Cairo.Surface similar) [0x00000]
  at Docky.Interface.DockArea.DrawIcon (Cairo.Context cr, Int32 icon) [0x00000]
  at Docky.Interface.DockArea.DrawIcons (Cairo.Context cr) [0x00000]
  at Docky.Interface.DockArea.DrawDrock (Cairo.Context cr) [0x00000]
  at Docky.Interface.DockArea.OnExposeEvent (Gdk.EventExpose evnt) [0x00000]
  at Gtk.Widget.exposeevent_cb (IntPtr widget, IntPtr evnt) [0x00000]
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Widget.exposeevent_cb(IntPtr widget, IntPtr evnt)
   at Gtk.Widget.exposeevent_cb(IntPtr , IntPtr )
   at Gtk.Application.gtk_main()
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at Do.Do.Main(System.String[] args)
Cairo.Context: called from finalization thread, programmer is missing a call to Dispose
Cairo.Context: called from finalization thread, programmer is missing a call to Dispose

Tags: crash
Changed in do:
importance: Undecided → Medium
status: New → Confirmed
description: updated
Jason Smith (jassmith)
Changed in do:
status: Confirmed → Fix Committed
Revision history for this message
Ionut Ticus (ticus-ionut) wrote :

Hello!

I can confirm that Gnome-Do crashes if ~/.local/share/Trash/files doesn't exist. I'm using Ubuntu Jaunty Alpha 4.
Gnome-Do is version 0.80 and the selected theme is Docky. No plugins activated here either.
What I had to do is :
   mkdir ~/.local/share/Trash
   touch files
After that Gnome-Do started fine. I think it's minor inconvenient to such a great app.

Best wishes
NoReflex

Revision history for this message
Peter Hicks (uppityteapot) wrote :

Second confirmation - throw something in the Trash - or create the file manually - and it works fine.

Revision history for this message
Fumihito YOSHIDA (hito) wrote :

lonut Ticus:

Your procedure create ~/.local/share/Trash/files as file. But "files" must as directory. Dont touch.
Probably, you cant use trash feature, didnt you? If so, you need "rm ~/.local/share/Trash/files && mkdir -p ~/.local/share/Trash/files".

Revision history for this message
Bob Hazard (junkbit) wrote :

This happens in Jaunty when you create a new user account because the directory doesn't exist yet.

If you run Gnome-do from the terminal you get the following error when you switch to Docky Mode

  System.IO.DirectoryNotFoundException: Directory '/home/tmp/.local/share/Trash/files' not found.

Creating an empty folder solved this

Robert Dyer (psybers)
tags: added: crash
Robert Dyer (psybers)
Changed in do:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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