Docky cannot initialize Transmisson custom item (Path too long)

Bug #486201 reported by Alexey Nedilko
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Do
Won't Fix
Undecided
Unassigned
gnome-do (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: gnome-do

When I'm adding Transmission to the Docky items, Do won't start the next time. Here is the snippet of --debug (I'm ataching the whole output, but that's the part that shows the problem):

[Error 10:39:29.458] Error in RunOnMainThread: Path is too long. Path: BitTorrent клиент Transmission: Скачивайте и обменивайтесь файлами в сети BitTorrent (Do.Universe.Linux.ApplicationItem)
[Debug 10:39:29.460] at System.IO.Directory.Exists (System.String path) [0x00000]
  at Docky.Core.Default.ItemsService.MaybeCreateCustomItem (System.String& identifier) [0x00000]
  at Docky.Core.Default.ItemsService.InternalAddItemToDock (System.String identifier, Int32 position) [0x00000]
  at Docky.Core.Default.ItemsService.UpdateItems () [0x00000]
  at Docky.Core.Default.ItemsService.HandleUniverseInitialized (System.Object sender, System.EventArgs e) [0x00000]
  at (wrapper delegate-invoke) System.EventHandler:invoke_void__this___object_EventArgs (object,System.EventArgs)
  at Do.Core.UniverseManager.<InitializeAsync>m__1E () [0x00000]
  at Do.Platform.ApplicationService+<RunOnMainThread>c__AnonStorey10.<>m__28 (System.Object sender, System.EventArgs e) [0x00000]

The string that is treated as path, is in fact the Comment in ru_RU locale of the Transmission .desktop file. Here is the .desktop file:
#!/usr/bin/env xdg-open

[Desktop Entry]
Name=Transmission BitTorrent Client
GenericName=BitTorrent Client
Comment=Download and share files over BitTorrent
Exec=transmission %F
Icon=transmission
Terminal=false
TryExec=transmission
Type=Application
MimeType=application/x-bittorrent;
Categories=Network;FileTransfer;P2P;GTK;
X-Ubuntu-Gettext-Domain=transmission
Icon[ru_RU]=transmission
Name[ru_RU]=BitTorrent клиент Transmission
Comment[ru_RU]=Скачивайте и обменивайтесь файлами в сети BitTorrent

I've looked into Docky.Core.Default.ItemsService.MaybeCreateCustomItem() method:
  AbstractDockItem MaybeCreateCustomItem (ref string identifier)
  {
   ItemDockItem customItem = null;

   if (identifier.StartsWith ("file://"))
    identifier = identifier.Substring ("file://".Length);

   if (File.Exists (identifier) || Directory.Exists (identifier)) {
    if (identifier.EndsWith (".desktop")) {

So that's where Directory.Exists fails because the path is very much incorrect - in fact, it obviously isn't a path.

As far as I see, there are several possible fixes:
1) Add try..catch to code that treats the item identifier as path (the code snippet above)
2) Change the format of ItemsService_CustomItems so that each identifier there contains information about what type of item it represents: a file, a folder, a .desktop file or something other, so that during initialization ItemsService doesn't end up probing all possible types of items for the identifier, but just get the correct type from identifier and create item.

Cheers,
Alex

ProblemType: Bug
Architecture: amd64
Date: Sat Nov 21 10:33:39 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: gnome-do 0.8.2+dfsg-1
ProcEnviron:
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: gnome-do
Uname: Linux 2.6.31-14-generic x86_64

Revision history for this message
Alexey Nedilko (alexey.nedilko) wrote :
Revision history for this message
Alexey Nedilko (alexey.nedilko) wrote :
description: updated
description: updated
Revision history for this message
Robert Dyer (psybers) wrote :

Thank you for your bug report. We have stopped support on Docky 1 (the Docky that ships with Gnome Do). Docky 2 was a complete rewrite and thus this bug may or may not exist there. Please install Docky 2 (it is a stand-alone app, you can install from lp:docky or Docky's PPA) and test for this bug. If it exists there, please report it to Docky's launchpad bug tracker.

Changed in do:
status: New → Won't Fix
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.