GNOME Bugzilla – Bug 345707
Trashes memory when trying to thumbnail this file
Last modified: 2007-01-31 13:08:12 UTC
Nautilus eats all the memory it can when you go in a directory containing this file: http://href.dyndns.org/~fabio/totem.gif until it gets killed by the kernel OOM killer. Backtrace: (gdb) thread apply all bt
+ Trace 69009
Thread 1 (Thread -1224866112 (LWP 27294))
Created attachment 67939 [details] Test program that also appears to trigger the bug This test program (compile as "gcc test.c `pkg-config gdk-2.0 --cflags --libs` -o test" and run as "test <image name>") also appears to cause the same bug.
(In reply to comment #1) > Created an attachment (id=67939) [edit] > Test program that also appears to trigger the bug > > This test program (compile as "gcc test.c `pkg-config gdk-2.0 --cflags --libs` > -o test" and run as "test <image name>") also appears to cause the same bug. Oh, and incidentally this happens to point to this being a gdk-pixbuf issue (or possibly elsewhere in other libraries used by gdk-pixbuf) and not a nautilus issue.
Thanks for your investigation Tom, reassigning.
Try with GTK+ 2.10. The gif loader has been changed to not load the full animation if you only need the first frame.
If you still see the problem with 2.10, please reopen.
I've just tested against 2.10.0, and we're still in OOM territory (2.6.17 kernel if that makes any difference). Have you tried the test program I attached?
Reopening based on the Tom's comments.
This is a libgnomeui problem, reassigning.
Created attachment 70248 [details] [review] Proposed libgnomeui patch The attached patch ensures that gnome_gdk_pixbuf_new_from_uri_at_scale stops shoveling data into memory when a pixbuf is available. This fixes the gif preview problems for me.
Just to clarify: I do not claim that the attached test program WFM, but the original bug report is definitly a consequence of not using GdkPixbufLoader properly.
Matthias: Maybe gdk_pixbuf_new_from_file_at_scale() should be patches in the same fashion? The code looks quite similar.
*** Bug 349970 has been marked as a duplicate of this bug. ***
Commited on HEAD.
Matthias?
*** Bug 350865 has been marked as a duplicate of this bug. ***
*** Bug 350509 has been marked as a duplicate of this bug. ***
That patch is not correct and needs to be reverted. The fact that loader_get_pixbuf returns non-NULL does not guarantee that the first frame has been fully loaded. To correctly test that you need to do something like the following: Get the animation from the loader Create an iter for it check that on_currently_loading_frame returns FALSE
Ok, reverting.
Created attachment 71015 [details] [review] possible solution Here's something I cooked up with some help from matthias
Please everyone test this with as many images/animations as possible to see if it breaks.
Ok, I'll have to test it myself then I see :-)
Seems like this didn't work out as planned. I still see nautilus eating memory like mad with the above. Could anyone else test and confirm that this is broken?
*** Bug 353479 has been marked as a duplicate of this bug. ***
(In reply to comment #20) > Please everyone test this with as many images/animations as possible to see if > it breaks. > Take a look at my bug 353479
*** Bug 335792 has been marked as a duplicate of this bug. ***
Kjartan: This seems to work nicely with a few sample files I tested, for instance the attachment from bug 335752 (which is a possibly interesting bug report about GTK+ gdk-pixbuf/GIF). Maybe you could attach a file where this fails?
Did you try the one in the first comment in this report? If it fixes that for you I guess we should just commit it.
It works for me so I commited it. I wonder what went wrong the last time I tried it.