Bug#1012677: libgtk-3-dev: Error loading png with gtk_image_set_from_file or gdk_pixbuf_new_from_file

Heinrich heinrich.adam at oltigen-manor.com
Sat Jun 11 16:03:45 BST 2022


Package: libgtk-3-dev
Version: 3.24.24-4+deb11u2
Severity: important
X-Debbugs-Cc: heinrich.adam at oltigen-manor.com

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***
I use Debian (11.1), installed : Xfce (4.16), libgtk-3-dev (3.24) build-essential (10.2.1-6)

If i call :

Image_AchtungGefahrLinks = gtk_image_new ();
gtk_image_set_from_file (GTK_IMAGE (Image_AchtungGefahrLinks), "./__png's/achtunggefahrleer.png");
gtk_fixed_put (GTK_FIXED(AlteVersionWindowFixedLayout), Image_AchtungGefahrLinks, 15, 530-7+25);

I receive :

Gtk-WARNING **: 14:21:42.596: Could not load a pixbuf from /org/gtk/libgtk/icons/16x16/status/image-missing.png.
This may indicate that pixbuf loaders or the mime database could not be found.

**

Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Format der Bilddatei unbekannt (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Format der Bilddatei unbekannt (gdk-pixbuf-error-quark, 3)
Aborted

if i call :

GError *error = NULL;
GdkPixbuf *pix = gdk_pixbuf_new_from_file ("./__png's/achtunggefahrleer.png", &error);
if (pix == NULL) {
    g_printerr ("Error loading file: #%d %s\n", error->code, error->message);
    g_error_free (error);
    exit (1);
}
GtkWidget *widget = gtk_image_new_from_pixbuf (pix);

I receive :

Error loading file: #3 Das Format der Bilddatei »./__png's/achtunggefahrleer.png« konnte nicht erkannt werden

the loaders are in
/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders

the loaders.cache is in 
/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/

the png info in loaders.cache is
"/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so"
"png" 5 "gdk-pixbuf" "PNG" "LGPL"
"image/png" ""
"png" ""
"\211PNG\r\n\032\n" "" 100

it seems that the pixbuf loaders can not be found

the image-missing.png is in

/usr/share/icons/Adwaita/16x16/status/ or /usr/share/icons/Tango/16x16/status/ or /usr/share/icons/gnome/16x16/status/ or /usr/share/man/man1/gtk+3.0-3.24.24/gtk/icons/16x16/status

but it searchs it in 
/org/gtk/libgtk/icons/16x16/status


-- System Information:
Debian Release: 11.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-9-amd64 (SMP w/16 CPU threads)
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8), LANGUAGE=de_CH:de
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libgtk-3-dev depends on:
ii  dconf-gsettings-backend [gsettings-backend]  0.38.0-2
ii  gir1.2-gtk-3.0                               3.24.24-4+deb11u2
ii  libatk-bridge2.0-dev                         2.38.0-1
ii  libatk1.0-dev                                2.36.0-2
ii  libcairo2-dev                                1.16.0-5
ii  libegl1-mesa-dev                             20.3.5-1
ii  libepoxy-dev                                 1.5.5-1
ii  libfontconfig-dev [libfontconfig1-dev]       2.13.1-4.2
ii  libfontconfig1-dev                           2.13.1-4.2
ii  libfribidi-dev                               1.0.8-2
ii  libgdk-pixbuf-2.0-dev                        2.42.2+dfsg-1
ii  libglib2.0-dev                               2.66.8-1
ii  libgtk-3-0                                   3.24.24-4+deb11u2
ii  libgtk-3-common                              3.24.24-4+deb11u2
ii  libpango1.0-dev                              1.46.2-3
ii  libwayland-dev                               1.18.0-2~exp1.1
ii  libx11-dev                                   2:1.7.2-1
ii  libxcomposite-dev                            1:0.4.5-1
ii  libxcursor-dev                               1:1.2.0-2
ii  libxdamage-dev                               1:1.1.5-2
ii  libxext-dev                                  2:1.3.3-1.1
ii  libxfixes-dev                                1:5.0.3-2
ii  libxi-dev                                    2:1.7.10-1
ii  libxinerama-dev                              2:1.1.4-2
ii  libxkbcommon-dev                             1.0.3-2
ii  libxrandr-dev                                2:1.5.1-1
ii  pkg-config                                   0.29.2-1
ii  wayland-protocols                            1.20-1

libgtk-3-dev recommends no packages.

Versions of packages libgtk-3-dev suggests:
pn  libgtk-3-doc  <none>

-- no debconf information


More information about the pkg-gnome-maintainers mailing list