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 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)
gdk_pixbuf_new_from_file_at_scale() should skip when there's enough image dat...
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 345707
Blocks:
 
 
Reported: 2006-08-11 15:32 UTC by Christian Neumair
Modified: 2010-07-10 04:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Christian Neumair 2006-08-11 15:32:01 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

Thread 1 (Thread -1224866112 (LWP 27294))

  • #0 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #1 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #2 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #3 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #4 nautilus_file_get_string_attribute
  • #5 egg_recent_item_unref
  • #6 eel_marshal_BOOLEAN__BOXED
    from /usr/lib/libeel-2.so.2
  • #7 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #9 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #12 eel_canvas_window_to_world
    from /usr/lib/libeel-2.so.2
  • #13 eel_canvas_c2w
    from /usr/lib/libeel-2.so.2
  • #14 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #15 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #20 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #21 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #23 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #24 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #25 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #26 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #27 POA_Nautilus_MetafileFactory__fini
  • #28 __libc_start_main
    from /lib/tls/libc.so.6
  • #29 ??

Comment 1 Matthias Clasen 2006-08-16 05:05:33 UTC
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
Comment 2 Matthias Clasen 2006-08-16 06:01:26 UTC
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)