GNOME Bugzilla – Bug 350911
gdk_pixbuf_new_from_file_at_scale() should skip when there's enough image data (was: Trashes memory when trying to thumbnail this file)
Last modified: 2010-07-10 04:04:09 UTC
libgnomeui was patched to stop loading an image using the GdkPixbufLoader when there's enough data for displaying an image, but GTK+ doesn't seem to do this. A patch like attachment 70248 [details] [review] against gdk_pixbuf_new_from_file_at_scale() could IMHO fix this. +++ This bug was initially created as a clone of Bug #345707 +++ 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 70251
Thread 1 (Thread -1224866112 (LWP 27294))
The libgnomeui patch you refer to is not correct, however. 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
2006-08-16 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file_at_scale): Stop loading an animation if the first frame is complete. (#350911, Christian Neumair)