`gdk_pixbuf_loader_close()` fails by issuing critical warnings without setting an error
I don't know if the problem comes from gdk-pixbuf itself, or from libopenraw not doing something it should do, because I've only encountered it so far with a RAF image, loaded via libopenraw.
The problem can for example be reproduced with EoG 41.1, when trying to load this image (I can't upload it here: too big): https://filesamples.com/formats/raf
This will generate this list of warnings:
(eog:275788): GdkPixbuf-CRITICAL **: 15:55:57.822: gdk_pixbuf_loader_prepare: assertion 'pixbuf != NULL' failed
(eog:275788): GdkPixbuf-CRITICAL **: 15:55:57.822: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(eog:275788): GdkPixbuf-CRITICAL **: 15:55:57.822: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(eog:275788): GdkPixbuf-CRITICAL **: 15:55:57.823: gdk_pixbuf_animation_get_height: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed
(eog:275788): GdkPixbuf-CRITICAL **: 15:55:57.823: gdk_pixbuf_animation_get_width: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed
(eog:275788): GdkPixbuf-CRITICAL **: 15:55:57.839: gdk_pixbuf_animation_is_static_image: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed
(eog:275788): GdkPixbuf-CRITICAL **: 15:55:57.839: gdk_pixbuf_animation_get_iter: assertion 'GDK_IS_PIXBUF_ANIMATION (animation)' failed
(eog:275788): GdkPixbuf-CRITICAL **: 15:55:57.839: gdk_pixbuf_animation_iter_get_pixbuf: assertion 'GDK_IS_PIXBUF_ANIMATION_ITER (iter)' failed
If we try to trace the problem in GDB, we will get something like this:
0x00007ffff7109a6b in g_logv () from /usr/lib/libglib-2.0.so.0
#0 0x00007ffff7109a6b in g_logv () at /usr/lib/libglib-2.0.so.0
#1 0x00007ffff7109d44 in g_log () at /usr/lib/libglib-2.0.so.0
#2 0x00007ffff0ffb2eb in gdk_pixbuf__or_image_stop_load (data=0x7fffdc020900, error=<optimized out>) at pixbuf-loader.c:130
#3 0x00007ffff742172b in gdk_pixbuf_loader_close (loader=0x5555557984c0, error=0x555555beee88) at ../gdk-pixbuf/gdk-pixbuf-loader.c:859