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 590788 - Nautilus freezes while generating image preview for a certain directory
Nautilus freezes while generating image preview for a certain directory
Status: RESOLVED DUPLICATE of bug 473862
Product: librsvg
Classification: Core
Component: general
unspecified
Other All
: Normal critical
: ---
Assigned To: librsvg maintainers
librsvg maintainers
: 485663 604525 (view as bug list)
Depends on: pango-threadsafe
Blocks:
 
 
Reported: 2009-08-04 23:42 UTC by apascall
Modified: 2012-01-29 18:21 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
GDB report when attached to frozen nautilus (bt full, info registers, thread apply all bt (11.57 KB, text/plain)
2009-08-04 23:44 UTC, apascall
  Details
testcase (4.47 KB, application/x-compressed-tar)
2009-08-05 15:30 UTC, apascall
  Details
Set THREADSAFE flag (869 bytes, patch)
2010-04-08 03:51 UTC, Hiroyuki Ikezoe
none Details | Review

Description apascall 2009-08-04 23:42:50 UTC
Please describe the problem:
Nautilus will consistently freeze while generating thumbnails for a certain directory. This does not happen with all directories on my computer.

Turning off the preview function (Edit->Preferences->Show Thumbnails (Never)) allows nautilus to open the directory with no problem.

The directory consists mainly of SVGs and PDFs, with the largest one being ~600 KB.  Other directories on my computer with SVGs and PDFs are fine.

Zipping the directory and unzipping to another directory on my computer does not solve the problem. However, I cannot reproduce the bug with the same directory on another computer. 

Removing the .nautilus and .thumbnails directories did not solve the problem.

Steps to reproduce:
1. Use Nautilus to navigate to the directory with preview enabled.



Actual results:
Nautilus will freeze.

Expected results:


Does this happen every time?
Yes

Other information:
See report from GDB.
Comment 1 apascall 2009-08-04 23:44:27 UTC
Created attachment 139915 [details]
GDB report when attached to frozen nautilus (bt full, info registers, thread apply all bt
Comment 2 apascall 2009-08-04 23:45:03 UTC
Should mention that I'm using Ubuntu Jaunty, x86_64
Comment 3 apascall 2009-08-05 00:02:39 UTC
After a bit more digging, it seems to be happening because there are SVG files that contained linked embedded images in the directory. 

Breaking the link (by moving the linked file or editing the SVG to point to a nonexistant file) allows a preview to be generated. 

Could it be that the program that is generating the thumbnails can't handle SVGs with embedded images that are linked to another file?
Comment 4 A. Walton 2009-08-05 12:33:11 UTC
Likely a problem with RSVG then. Please provide an example if you can. Reassigning to RSVG.
Comment 5 apascall 2009-08-05 15:29:09 UTC
Ok, I've further narrowed down what is causing it.

It seems to only occur when TIF files are embedded with their absolute paths.

Embedding a PNG doesn't cause the behavior. Embedding a TIF with a relative path causes a preview to be generated, but without the TIF.

I have confirmed this bug on another computer.

Attached is a file that generates the hang. 

Steps to reproduce:
1. Edit line 17 of gnome_logo_test.svg to point to 125px-Gnomelogo.tif with the absolute path.

2. Browse to the folder containing the SVG with preview turned on. You should see the SVG icon like it is trying to generate a preview.

3. Try to open another window, say from "Places->home."

4. Nautilus has hung. 
Comment 6 apascall 2009-08-05 15:30:04 UTC
Created attachment 139954 [details]
testcase
Comment 7 Geoff Hickey 2010-03-02 03:58:29 UTC
I can confirm this bug on Ubuntu 9.10 (Karmic). The conditions are the same: a .svg file containing an embedded .tif file. Mine was in my home directory, and nautilus hung whenever I opened a file explorer window on that directory.

I ran strace on it, here's the tail of that output:

poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=12, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=25, events=POLLIN}, {fd=6, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=18, events=POLLIN}, {fd=17, events=POLLIN}, {fd=24, events=POLLIN}, {fd=9, events=POLLIN}], 15, 39) = 0 (Timeout)
read(3, 0x11b69e4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=12, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=25, events=POLLIN}, {fd=6, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=18, events=POLLIN}, {fd=17, events=POLLIN}, {fd=24, events=POLLIN}, {fd=9, events=POLLIN}], 15, 0) = 0 (Timeout)
read(3, 0x11b69e4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=12, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=25, events=POLLIN}, {fd=6, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=18, events=POLLIN}, {fd=17, events=POLLIN}, {fd=24, events=POLLIN}, {fd=9, events=POLLIN}], 15, 97) = 0 (Timeout)
read(3, 0x11b69e4, 4096)                = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=12, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=25, events=POLLIN}, {fd=6, events=POLLIN}, {fd=26, events=POLLIN}, {fd=27, events=POLLIN}, {fd=18, events=POLLIN}, {fd=17, events=POLLIN}, {fd=24, events=POLLIN}, {fd=9, events=POLLIN}], 15, 0) = 0 (Timeout)
lstat("/usr/share/icons/Human/scalable/emblems/emblem-shared.svg", {st_mode=S_IFREG|0644, st_size=5975, ...}) = 0
open("/usr/share/icons/Human/scalable/emblems/emblem-shared.svg", O_RDONLY) = 44
fstat(44, {st_mode=S_IFREG|0644, st_size=5975, ...}) = 0
read(44, "<?xml version=\"1.0\" encoding=\"UT"..., 65536) = 5975
futex(0x7f02f08f9488, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
+++ killed by SIGKILL +++

The last .svg file it mentions - emblem-shared.svg - is not the file that caused the problem.
Comment 8 Hiroyuki Ikezoe 2010-04-08 03:51:52 UTC
Created attachment 158164 [details] [review]
Set THREADSAFE flag

This patch fixes this issue, but may cause crash because Pango is not completely threadsafe.
Comment 9 Hiroyuki Ikezoe 2010-04-10 22:24:11 UTC
*** Bug 604525 has been marked as a duplicate of this bug. ***
Comment 10 Hiroyuki Ikezoe 2010-04-14 09:13:28 UTC
*** Bug 485663 has been marked as a duplicate of this bug. ***
Comment 11 Ian Lynch 2010-09-21 11:55:30 UTC
(In reply to comment #5)
> Ok, I've further narrowed down what is causing it.
> 
> It seems to only occur when TIF files are embedded with their absolute paths.
> 
> Embedding a PNG doesn't cause the behavior. Embedding a TIF with a relative
> path causes a preview to be generated, but without the TIF.
> 
> I have confirmed this bug on another computer.
> 
> Attached is a file that generates the hang. 
> 
> Steps to reproduce:
> 1. Edit line 17 of gnome_logo_test.svg to point to 125px-Gnomelogo.tif with the
> absolute path.
> 
> 2. Browse to the folder containing the SVG with preview turned on. You should
> see the SVG icon like it is trying to generate a preview.
> 
> 3. Try to open another window, say from "Places->home."
> 
> 4. Nautilus has hung.

I don't think it is confined to TIFF. I have a file that causes the same problem and it has only .png imported files. Seems to not matter if they have been embedded or not.
Comment 12 Mahendra Tallur 2011-03-08 10:38:13 UTC
Indeed, a very similar issue occurs here (Ubuntu Maverick amd64) when previewing a directory containing a svg file embedding many big jpeg pictures. (no tiff at all)

Actually, it occurs with 2 similar svg files. The 1st one does embed all jpeg files and the preview doesn't even have the time to be generated. The second one only contains links to pictures, so a blank preview is generated. 

However, *In both cases*, Nautilus eventually quits responding and I have to kill it. In the first case, during the preview calculation, in the second case, shortly after selecting the svg file.
Comment 13 Mahendra Tallur 2011-03-08 11:46:00 UTC
Sorry for posting twice in a row. But I thought you might find relevant to know that the issue also occurs under the latest Gnome 3 preview LiveCD. (and also under Ubuntu Natty, as of today).
Comment 14 Charlie Warner 2011-09-20 00:56:48 UTC
I have recently posted this on the forums, and want to add my comments to the bug report:

I have recently encountered a problem where Nautilus freezes when I open a folder containing *.svg files created with Inkscape Version 0.47. This happens whether I start Nautilus with the "Places" menu or from the command line. No error messages are presented on the command line. The files in question can be opened from the original program that created them, and using the ls command I get a complete list of the files. System specifics:

Ubuntu 10.04 (64 bit)
Gnome 2.30.2
Nautilus 2.30.1
Kernel 2.6.32-33-generic

I have searched the forums and bugs and find nothing that can tell me where the problem lies. 

Further:

Reviewing related bug reports, it appears that this is specifically related to *.svg files created with Inkscape that include largish bit maps.  Other *.svg files, and *.svg files created in Inkscape without largish bit maps don't seem to cause the same effect...
Comment 15 Nicola 2011-12-13 07:05:51 UTC
I can confirm this bug is still there with Gnome 3, running under Fedora 16. Embedding the tiff image does not seem to help, nor saving the svg as plain svg rather than Inkscape svg.

Anyone can comment on an ETA for fixing this or at least giving a viable workaround to selectively disable preview on svg files (disabling all thumbnails is NOT one).
Comment 16 Christian Persch 2012-01-29 18:21:10 UTC

*** This bug has been marked as a duplicate of bug 473862 ***