GNOME Bugzilla – Bug 590788
Nautilus freezes while generating image preview for a certain directory
Last modified: 2012-01-29 18:21:10 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.
Created attachment 139915 [details] GDB report when attached to frozen nautilus (bt full, info registers, thread apply all bt
Should mention that I'm using Ubuntu Jaunty, x86_64
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?
Likely a problem with RSVG then. Please provide an example if you can. Reassigning to RSVG.
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.
Created attachment 139954 [details] testcase
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.
Created attachment 158164 [details] [review] Set THREADSAFE flag This patch fixes this issue, but may cause crash because Pango is not completely threadsafe.
*** Bug 604525 has been marked as a duplicate of this bug. ***
*** Bug 485663 has been marked as a duplicate of this bug. ***
(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.
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.
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).
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...
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).
*** This bug has been marked as a duplicate of bug 473862 ***