Bug 376669

Summary: nautilus - thumbnail update fails at 150% zoom
Product: [openSUSE] openSUSE 11.0 Reporter: Michael Meeks <mmeeks>
Component: GNOMEAssignee: Hans Petter Jansson <hpj>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: captain.magnus, lars.vogdt
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: gnome-function-does-not-work gnome-wrong-out-of-the-box
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: nautilus-bnc376669-always-update-thumbnail.patch

Description Michael Meeks 2008-04-03 08:26:14 UTC
I save a screenshot to my desktop; right click, open-in-Gimp, crop the image substantially, hit save ....

The desktop thumbnail doesn't appear to update at all, I still see the un-cropped image there (which makes me nervous about mailing it and is just plain wrong :-).

Clicking on it doesn't force a refresh, only when I "stretch icon" do I get a refresh.

Interestingly if (from the console) I create a new file in ~/Desktop - all is well, the thumbnail updates as expected, however if I copy a new file over it (as before it fails). If I then 'mv' the file to a new name it re-thumbnails it.

HTH.
Comment 1 Hans Petter Jansson 2008-04-17 04:33:03 UTC
Sounds like your file monitoring is broken somehow. I can not repro the bug here. Can you attach output of "rpm -q --changelog nautilus | head -20" and ditto for libgio-2_0-0?
Comment 2 Michael Meeks 2008-04-17 09:35:11 UTC
Sure - the bug is still there with the latest packages from factory:

michael@t60p:~> rpm -q --changelog nautilus | head
* Thu Apr 10 2008 maw@suse.de
- Update to version 2.22.2:
  + Add NautilusFileInfo APIs: can_write(), get_mount(),
  get_parent_info()
  + Do not try to autorun autorun.exe and autorun.inf
  + Automount in idle callback rather than at startup to improve
  user experience
  + Properly inhibit automount on startup, or for long login procedures
  + Do not automount directories in hidden hierarchies
  + Fix scrollbar display bug in "text besides icon" icon view mode
michael@t60p:~> rpm -q --changelog libgio-2_0-0 | head
* Sat Apr 12 2008 maw@suse.de
- Tag glib2-libtool.diff, which was added in the previous
  submission.

* Fri Apr 11 2008 schwab@suse.de
- Work around broken configure script.

* Thu Apr 10 2008 maw@suse.de
- Update to version 2.16.3:
  + Bugs fixed: bgo#521513, bgo#316221, bgo#520914, bgo#521045,


Presumably as you say it's a missing monitoring package (somewhere).

my ~/.xsession-errors has:

** (nautilus:4666): WARNING **: Unable to add monitor: Not supported

I have:

michael@t60p:~> rpm -qa | grep -i fam
fam-2.7.0-98
fam-devel-2.7.0-98
libgio-fam-2.16.3-3
fam-server-2.7.0-98
michael@t60p:~> rpm -qa | grep -i inotify
michael@t60p:~> 

and interestingly FAM is not started (but shouldn't we be using inotify ?):

michael@t60p:/home> /sbin/chkconfig -l | grep fam
fam                       0:off  1:off  2:off  3:off  4:off  5:off  6:off
        fam:                off

michael@t60p:~> rpm -qa | grep libgio
libgio-fam-2.16.3-3
libgio-2_0-0-2.16.3-3

HTH.
Comment 3 JP Rosevear 2008-05-04 16:59:35 UTC
*** Bug 368719 has been marked as a duplicate of this bug. ***
Comment 4 JP Rosevear 2008-05-05 04:43:32 UTC
*** Bug 383786 has been marked as a duplicate of this bug. ***
Comment 5 Hans Petter Jansson 2008-05-08 00:10:42 UTC
The "Not supported" text, could it be strerror(ENOTSUPP)? Maybe there's something wrong about inotify support in the kernel, or the way we're using it is wrong or not up to date? Anyway, I'm not sure it's related.

I'm still not able to repro the problem here - with beta 1 - using the copy picture, edit picture in gimp, hit save method.

I do get the "Not supported" warning, and I also have no fam running. My nautilus appears to be slightly newer than yours, though I don't think it matters.

I'm working on the assumption that what you suggested in one of the duplicate bugs is correct: That the thumbnailing process starts early and finishes before the whole file is written, then fails to re-thumbnail the image after the rest of it has been written out. I might not be seeing it because I'm testing on a single-core CPU.
Comment 6 Magnus Boman 2008-05-08 00:23:54 UTC
Seems it's only .png? If I grab a screenshot and save it with a .png extension, I'll have to double click on it and then from the Desktop hit F5 to see the thumbnail.
If I save the screenshot as .bmp it will show a thumbnail straight away.
Comment 7 Magnus Boman 2008-05-08 07:31:00 UTC
And then, after upgrading from Factory, two of my machines with this issue now started working correctly with regards to the thumbnails :-)
Comment 8 Michael Meeks 2008-05-08 11:16:24 UTC
Well - monitoring appears to work, but nautilus isn't playing ball:

9236  1210244666.331618 <... futex resumed> ) = 0
9236  1210244666.331663 futex(0x81add90, FUTEX_WAKE_PRIVATE, 1) = 0
9236  1210244666.331731 gettimeofday({1210244666, 331752}, NULL) = 0
9236  1210244666.331846 access("/home/michael/Desktop", W_OK) = 0
9236  1210244666.331949 stat64("/home/michael/Desktop", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
9236  1210244666.332166 lstat64("/home/michael/Desktop/mydesktop.png", {st_mode=S_IFREG|0644, st_size=270891, ...}) = 0
9236  1210244666.332437 gettimeofday({1210244666, 332463}, NULL) = 0
9236  1210244666.332534 stat64("/home/michael/.local/share//mime/mime.cache", {st_mode=S_IFREG|0644, st_size=452, ...}) = 0
9236  1210244666.332736 stat64("/usr/local/share/mime/mime.cache", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.332859 stat64("/usr/local/share/mime/globs", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.332969 stat64("/usr/local/share/mime/magic", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.333114 stat64("/usr/share/mime/mime.cache", {st_mode=S_IFREG|0644, st_size=80876, ...}) = 0
9236  1210244666.333292 stat64("/usr/share/gdm/mime/mime.cache", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.333395 stat64("/usr/share/gdm/mime/globs", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.333493 stat64("/usr/share/gdm/mime/magic", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.333593 stat64("/etc/opt/kde3/share/mime/mime.cache", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.333704 stat64("/etc/opt/kde3/share/mime/globs", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.333806 stat64("/etc/opt/kde3/share/mime/magic", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.333909 stat64("/opt/kde3/share/mime/mime.cache", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.334012 stat64("/opt/kde3/share/mime/globs", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.334111 stat64("/opt/kde3/share/mime/magic", 0xb318fefc) = -1 ENOENT (No such file or directory)
9236  1210244666.334282 gettimeofday({1210244666, 334305}, NULL) = 0
9236  1210244666.334380 access("/home/michael/Desktop/mydesktop.png", R_OK) = 0
9236  1210244666.334489 access("/home/michael/Desktop/mydesktop.png", W_OK) = 0
9236  1210244666.334594 access("/home/michael/Desktop/mydesktop.png", X_OK) = -1 EACCES (Permission denied)
9236  1210244666.334736 stat64("/home/michael/.thumbnails/normal/3bdfe05aa572588bb43729033ee55362.png", {st_mode=S_IFREG|0600, st_size=13444, ...}) = 0
9236  1210244666.334959 write(5, "A", 1) = 1

$ ls -l ~/.thumbnails/normal/3bdfe05aa572588bb43729033ee55362.png
-rw------- 1 michael users 13444 2008-04-28 14:50
$ ls -l ~/Desktop/mydesktop.png 
-rw-r--r-- 1 michael users 270891 2008-05-08 12:04

ie. the thumbnail is rather older than the image itself; but ... apparently we give up trying to re-thumbnail it :-)
Comment 9 Michael Meeks 2008-05-12 10:52:12 UTC
Up-stream with more detail as: http://bugzilla.gnome.org/show_bug.cgi?id=532725
Comment 10 Hans Petter Jansson 2008-05-20 02:12:01 UTC
I've tested it thoroughly, and it looks like Michael's right as usual. I'm still not sure why the >128 is in there, but it has the hallmarks of an optimization attempt.
Comment 11 Hans Petter Jansson 2008-05-20 02:16:02 UTC
Created attachment 216645 [details]
nautilus-bnc376669-always-update-thumbnail.patch

Patch based on Michael's suggestion. It works for me and I haven't been able to make it act up in any way. In the interest of expedience, I'll submit this while we wait for a reply from upstream (I think we'll need to speak with Alex himself - and he's on parental leave, so it might take a while).
Comment 12 Hans Petter Jansson 2008-05-20 02:39:11 UTC
Submitted to STABLE. If the patch is found to cause other problems, those should be addressed in a separate bug.
Comment 13 Hans Petter Jansson 2008-06-07 02:55:32 UTC
Michael pointed this out; looks like the patch causes Nautilus to constantly re-thumbnail images. Going to back out the patch for now.
Comment 14 Lars Vogdt 2008-06-16 10:48:35 UTC
AS 11.0 is done for us now, we need a SWAMPID for an online update.
Comment 15 Lars Vogdt 2008-06-16 12:07:53 UTC
ok: looks like we can release this together with the fix for bug #397852 -> closing