thumbnail problems with relative soft-links

Bug #109579 reported by ooops
12
Affects Status Importance Assigned to Milestone
gThumb
Fix Released
Medium
gthumb (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gthumb

I have a non-standard setup regarding my home directory. Instead of hard-mounting a partition to /home II use a symbolic link pointing /media/sda5 which is the actual. The problem is that if I create the link as a relative link

cd /; ln -s media/sda5 home

I get an error message (see strace below) in case a thumbnail is accesses by gthumb. Clearly the lstat64 to '/sda5' is nonsense. No thumbnails are shown because they are apparently not found. In case I create the link as

cd /; ln -s /media/sda5 /home

everything is fine. Nautilus also did not show thumbnails until I deleted ~/.thumbnails. After that at least nautilus displayed thumbnails again. However, in case of gthumb only setting the link works. So I am not sure if this a library problem (have no idea, what code is shared regarding thumbnails between nautilus and gthumb). But in any case some code wrt. to thumbnails following symbolic links is buggy.

Kind regards, Peter

===

lstat64("/home/ooops/pictures/0new/DSCN1643.JPG", {st_mode=S_IFREG|0644, st_size=645713, ...}) = 0
lstat64("/home", {st_mode=S_IFLNK|0777, st_size=10, ...}) = 0
readlink("/home", "media/sda5", 256) = 10
lstat64("/sda5", 0xbfc5fbfc) = -1 ENOENT (No such file or directory)
write(2, "\n** (gthumb:6358): WARNING **: F"..., 47
** (gthumb:6358): WARNING **: File not found

Revision history for this message
mjc (mjc-avtechpulse) wrote :

What version of gthumb do you have?

- Mike

Revision history for this message
ooops (ooops) wrote : Re: [Bug 109579] Re: thumbnail problems with relative soft-links

Sorry, forgot that. Standard feisty - 3:2.10.2-0ubuntu1.

-Peter

Michael Chudobiak wrote:
> What version of gthumb do you have?
>
> - Mike
>
>

Revision history for this message
Tom Kirby (tc-kirby) wrote :

I can't get thumbnails in symlinked directories either.

"/home/tom/Desktop/2007-05/" is a symlink pointing to "/home/tom/pictures/photos_archive/2007-05/".

If I open "~/Desktop/2007-05/" in Nautilus, and then double-click one of the photos to open it with gthumb, then go to the "browser" view, no thumbnails appear.

If, on the other hand, I go to "/home/tom/pictures/photos_archive/2007-05/" in gthumb, all the thumbnails show up.

I don't know whether this is a problem with gthumb or gnomevfs, as it could be to do with an error in detecting whether or not the directory in question is a network share.

I have attached the output I get from gthumb when using "~/Desktop/2007-05/". I get no output at all when I use "~/pictures/photos_archive/2007-05/".

Changing the thumbnail setting in Nautilus to allow viewing thumbnails on network shares does not solve the problem.

I did not get this problem in Edgy.

Revision history for this message
mjc (mjc-avtechpulse) wrote :

Tom,

Could you clarify which directories are local and which are "remote" in your setup? And how are the remote ones mounted, exactly?

I'm having a hard time reproducing this, so we need to establish exactly what conditions trigger this problem.

- Mike

Revision history for this message
Tom Kirby (tc-kirby) wrote :

Sorry if I didn't make this clear: all of the directories concerned are on the same filesystem, which is a local filesystem mounted on "/home".

Revision history for this message
mjc (mjc-avtechpulse) wrote :

I can't duplicate this on my gThumb development systems, which all run Fedora. I wonder if this is an Ubuntu-specific glitch. Can anyone provide a technique for reproducing this bug on FC6 or FC7?

Also, it is worth checking all instances of gthumb.desktop, to make sure that this line is present:

Exec=gthumb %U

- Mike

Revision history for this message
Francesco Potortì (pot) wrote : Re: [Bug 119017] Re: gthumb does not display thumbnails

>https://bugs.launchpad.net/bugs/119017

>Hmm, your last comment suggests that gThumb is having trouble
>understanding the symbolic link to the win32 filesystem.
>
>I guess this is a duplicate of https://bugs.launchpad.net/bugs/109579.

Apparently yes, thank you. If it is, then some things are to be noted:
- this is a regression from the 2.7.9 version of gthumb
- this is apparently not a problem with libraries, but with gthumb
  itself, as downgrading to 2.7.9 solves the problem
- relative links are not necessary to reproduce the problem, as the link
  on my desktop is absolute.

Revision history for this message
mjc (mjc-avtechpulse) wrote :

Francesco,

If you know how to edit / compile the source code, I would stick some printf's in libgthumb/file-utils.c:resolve_symlinks to see what is getting mangled.

If this is a gThumb bug, it's probably in there.

The file handling code changed extensively between 2.7.9 and 2.10.2, so it's not a surprise if there is a regression. The 2.7.9 version didn't support gnome-vfs.

- Mike

Revision history for this message
Francesco Potortì (pot) wrote :

When gthumb 2.10.2 (errors, no thumbnails) is installed I have:
$ fgrep Exec `locate gthumb.desktop`
/usr/share/app-install/desktop/gthumb.desktop:Exec=gthumb %U
/usr/share/applications/gthumb.desktop:Exec=gthumb %U

When 2.7.9 (no errors, thumbnails ok) is installed I have:
$ fgrep Exec `locate gthumb.desktop`
/usr/share/app-install/desktop/gthumb.desktop:Exec=gthumb %U
/usr/share/applications/gthumb.desktop:Exec=gthumb %F

So I tried to install 2.10.2 and modified /usr/share/applications/gthumb.desktop
by changing %U to %F, but nothing changed.

Revision history for this message
Francesco Potortì (pot) wrote : Re: [Bug 109579] Re: thumbnail problems with relative soft-links

>If you know how to edit / compile the source code, I would stick some
>printf's in libgthumb/file-utils.c:resolve_symlinks to see what is
>getting mangled.

Sorry, I would be able, given enough time, but I have not the time :-(

I already spent my share of time to report this bug in detail, and I
cannot spend any more in the next days, I fear. I should be able to
spare the time to try things or follow detailed instructions, however.
So, if you can build an instrumented gthumb for me to try, I can try it.

Better yet, if you can instrument the source as an example and give me a
tarball with instructions how to build and install it, I may be able to
find the time locate the problem.

Revision history for this message
Francesco Potortì (pot) wrote : gthumb: does not show thumbnails on symlinked directories
Download full text (4.8 KiB)

Package: gthumb
Version: 3:2.10.2-4
Severity: normal

At last I tried to reproduce it easily! This is a bug I had signaled on
<https://bugs.launchpad.net/bugs/109579> as a cross-fs linking bug. Now
I just discovered that it can be reproduced on a single ext2 file
system, just by using a complex symlink setup.

Given certain simlinked directory configurations, ghtumb 2.10 does not
display thumbnails. The discussion on launchpad suggests that this is
in fact a problem with the gnome-vfs library or its use in gthumb.

Here are steps to reproduce the problem. The problem comes up only on
the last command, together with libgnomevfs errors.

$ mkdir -p /tmp/pot
$ mkdir -p /tmp/www/pot.it/pot/acquari/stagnetto
$ ln -s /tmp/www /tmp/pot/.
$ ln -s /tmp/pot/www/pot.it/pot/acquari /tmp/pot/.
$ cd /tmp/pot/acquari/stagnetto/
$ cp /usr/share/pixmaps/*/*.jpg . ## this is a total of 22 files
$ gthumb . ## everything good up to now
              ------------- <the following gthumb does not show thumbnails>
$ gthumb $PWD
              ------------- <following message repeated 25 times>
(gthumb:6998): libgnomevfs-CRITICAL **: gnome_vfs_uri_new_private: assertion `text_uri != NULL' failed

              ------------- <following message repeated 21 times>
(gthumb:6998): libgnomevfs-CRITICAL **: gnome_vfs_uri_new_private: assertion `text_uri != NULL' failed
** (gthumb:6998): WARNING **: Unsupported operation

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=it_IT@euro (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages gthumb depends on:
ii gconf2 2.18.0.1-3 GNOME configuration database syste
ii libart-2.0-2 2.3.19-3 Library of functions for 2D graphi
ii libatk1.0-0 1.18.0-2 The ATK accessibility toolkit
ii libbonobo2-0 2.18.0-2 Bonobo CORBA interfaces library
ii libbonoboui2-0 2.18.0-5 The Bonobo UI library
ii libc6 2.5-9 GNU C Library: Shared libraries
ii libcairo2 1.4.6-1.1 The Cairo 2D vector graphics libra
ii libexif12 0.6.16-1 library to parse EXIF files
ii libfontconfig1 2.4.2-1.2 generic font configuration library
ii libgconf2-4 2.18.0.1-3 GNOME configuration database syste
ii libglade2-0 1:2.6.1-1 library to load .glade files at ru
ii libglib2.0-0 2.12.12-1 The GLib library of C routines
ii libgnome-keyring0 0.8.1-2 GNOME keyring services library
ii libgnome2-0 2.18.0-4 The GNOME 2 library - runtime file
ii libgnomecanvas2-0 2.14.0-3 A powerful object-oriented display
ii libgnomeui-0 2.18.1-2 The GNOME 2 libraries (User Interf
ii libgnomevfs2-0 1:2.18.1-2 GNOME Virtual File System (runtime
ii libgphoto2-2 2.3.1-5 gphoto2 digital came...

Read more...

Revision history for this message
mjc (mjc-avtechpulse) wrote :

Thanks for the reproducible test case!

Reported upstream at http://bugzilla.gnome.org/show_bug.cgi?id=455911.

- Mike

Revision history for this message
mjc (mjc-avtechpulse) wrote :

Fixed upstream. The patch will appear in 2.10.6 and later.

If you want to patch it yourself, see http://svn.gnome.org/viewcvs/gthumb?view=revision&revision=1755.

- mike

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks you for forward it upstream!

Changed in gthumb:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Fix Committed
Changed in gthumb:
status: Unknown → Fix Released
Changed in gthumb:
status: Fix Committed → Fix Released
Changed in gthumb:
importance: Unknown → Medium
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.