Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #228565 > unrolled thread

GTK can't load images

Started byMalte Marwedel <mmDebMail2020@marwedels.de>
First post2020-11-11 12:30 +0100
Last post2020-11-11 14:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  GTK can't load images Malte Marwedel <mmDebMail2020@marwedels.de> - 2020-11-11 12:30 +0100
    Re: GTK can't load images The Wanderer <wanderer@fastmail.fm> - 2020-11-11 13:10 +0100
      Re: GTK can't load images Gene Heskett <gheskett@shentel.net> - 2020-11-11 14:20 +0100

#228565 — GTK can't load images

FromMalte Marwedel <mmDebMail2020@marwedels.de>
Date2020-11-11 12:30 +0100
SubjectGTK can't load images
Message-ID<B9Wu7-2Cc-19@gated-at.bofh.it>
Hello,
since recently, several applications (firefox, pavucontrol, pidgin...) 
fail to load images with gtk.
This happens when logging in as different user too, so its unlikely this 
is a setting in the ~ directory.
The error message is as following:

$ pavucontrol

(process:13818): Gtk-WARNING **: 11:47:10.492: Locale not supported by C 
library.
         Using the fallback 'C' locale.

(pavucontrol:13818): Gtk-WARNING **: 11:47:10.592: Could not load a 
pixbuf from icon theme.
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 
/usr/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized 
image file format (gdk-pixbuf-error-quark, 3)
Abgebrochen

But the file is there:
$ file /usr/share/icons/Adwaita/16x16/status/image-missing.png
/usr/share/icons/Adwaita/16x16/status/image-missing.png: PNG image data, 
16 x 16, 8-bit/color RGBA, non-interlaced

And debsums -s does not find any wrong .png files, so its not a problem 
with the filesystem.

After googling the error for two hours but don't finding any working 
solution. I started to dig the problem down.
Lucily, I had already build gtk+3.0-3.24.5 myself before (reason: 
https://superuser.com/questions/1033414/how-to-disable-gtkfilechooserdialog-search), 
so I have debug symbols there
gdb pavucontrol

I ended up at:
#0  0x00007ffff6b3a280 in gdk_pixbuf_new_from_stream () at 
/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
#1  0x00007ffff7007fdf in icon_info_ensure_scale_and_pixbuf 
(icon_info=0x555555c0b0d0) at ../../../../gtk/gtkicontheme.c:3951
#2  0x00007ffff7007fdf in icon_info_ensure_scale_and_pixbuf 
(icon_info=0x555555c0b0d0) at ../../../../gtk/gtkicontheme.c:3835
#3  0x00007ffff700b1f8 in gtk_icon_info_load_icon 
(icon_info=0x555555c0b0d0, error=0x0) at ../../../../gtk/gtkicontheme.c:4070
#4  0x00007ffff700b454 in gtk_icon_theme_load_icon_for_scale
     (icon_theme=icon_theme@entry=0x555555922480, 
icon_name=icon_name@entry=0x555555b4c3d0 "multimedia-volume-control", 
size=size@entry=48, scale=scale@entry=1, flags=flags@entry=(unknown: 0), 
error=error@entry=0x0) at ../../../../gtk/gtkicontheme.c:2347
#5  0x00007ffff700b619 in gtk_icon_theme_load_icon
     (icon_theme=icon_theme@entry=0x555555922480, 
icon_name=icon_name@entry=0x555555b4c3d0 "multimedia-volume-control", 
size=size@entry=48, flags=flags@entry=(unknown: 0), 
error=error@entry=0x0) at ../../../../gtk/gtkicontheme.c:2284
#6  0x00007ffff719182b in icon_list_from_theme 
(window=window@entry=0x55555582e280, name=0x555555b4c3d0 
"multimedia-volume-control")
     at ../../../../gtk/gtkwindow.c:4483
#7  0x00007ffff7192cd1 in gtk_window_realize_icon 
(window=0x55555582e280) at ../../../../gtk/gtkwindow.c:4531
#8  0x00007ffff719a2df in gtk_window_realize (widget=0x55555582e280) at 
../../../../gtk/gtkwindow.c:7591
#9  0x000055555559962e in  ()
#10 0x00007ffff7d9043b in 
Gtk::Widget_Class::realize_callback(_GtkWidget*) () at 
/usr/lib/x86_64-linux-gnu/libgtkmm-3.0.so.1
#11 0x00007ffff692ac8d in g_closure_invoke () at 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff693e4b4 in  () at 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff69472be in g_signal_emit_valist () at 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff694797f in g_signal_emit () at 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff718acd6 in gtk_widget_realize 
(widget=widget@entry=0x55555582e280) at ../../../../gtk/gtkwidget.c:5471
#16 0x00007ffff71987fd in gtk_window_show (widget=0x55555582e280) at 
../../../../gtk/gtkwindow.c:6180
#17 0x00007ffff7d9028b in Gtk::Widget_Class::show_callback(_GtkWidget*) 
() at /usr/lib/x86_64-linux-gnu/libgtkmm-3.0.so.1
#18 0x00007ffff692ac8d in g_closure_invoke () at 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff693e4b4 in  () at 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007ffff69472be in g_signal_emit_valist () at 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff694797f in g_signal_emit () at 
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff7184e36 in gtk_widget_show (widget=0x55555582e280) at 
../../../../gtk/gtkwidget.c:4800
#23 0x00007ffff7184e36 in gtk_widget_show (widget=0x55555582e280) at 
../../../../gtk/gtkwidget.c:4773
#24 0x00007ffff7d30849 in Gtk::Main::run(Gtk::Window&) () at 
/usr/lib/x86_64-linux-gnu/libgtkmm-3.0.so.1
#25 0x0000555555586a5e in main ()

gdk_pixbuf_new_from_stream is returning NULL. Unfortunately there are no 
debug symbols in Debian for libgdk_pixbuf.
So I tried to build this lib with debug symbols too.
apt-get source libgdk-pixbuf2.0-dev
cd gdk-pixbuf-2.38.1+dfsg/
debuild -b  -us -uc  --no-pre-clean -j1

But this fails with tests/resources.c not found.
Why is this file missing? Because a image file could not be loaded:
[1/97] Generating resources.c with a custom command.
failed to load 
"/home/malte/programming/c-addadd/libgdk-pixbuf20/gdk-pixbuf-2.38.1+dfsg/tests/icc-profile.png": 
Couldn?t recognize the image file format for file 
?/home/malte/programming/c-addadd/libgdk-pixbuf20/gdk-pixbuf-2.38.1+dfsg/tests/icc-profile.png?
../tests/resources.gresource.xml: Der Kindprozess wurde mit Status 1 
beendet.

But once more the file is there:
file 
/home/malte/programming/c-addadd/libgdk-pixbuf20/gdk-pixbuf-2.38.1+dfsg/tests/icc-profile.png
/home/malte/programming/c-addadd/libgdk-pixbuf20/gdk-pixbuf-2.38.1+dfsg/tests/icc-profile.png: 
PNG image data, 48 x 48, 8-bit/color RGBA, non-interlaced

I think at this point I am struck. Because GTK can't load images, I 
can't build the lib to figure out why images can't be loaded.
Any help?

[toc] | [next] | [standalone]


#228566

FromThe Wanderer <wanderer@fastmail.fm>
Date2020-11-11 13:10 +0100
Message-ID<B9X6O-359-7@gated-at.bofh.it>
In reply to#228565

[Multipart message — attachments visible in raw view] — view raw

On 2020-11-11 at 06:12, Malte Marwedel wrote:

> Hello,
> since recently, several applications (firefox, pavucontrol, pidgin...) 
> fail to load images with gtk.
> This happens when logging in as different user too, so its unlikely this 
> is a setting in the ~ directory.
> The error message is as following:
> 
> $ pavucontrol
> 
> (process:13818): Gtk-WARNING **: 11:47:10.492: Locale not supported by C 
> library.
>          Using the fallback 'C' locale.
> 
> (pavucontrol:13818): Gtk-WARNING **: 11:47:10.592: Could not load a 
> pixbuf from icon theme.
> 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 
> /usr/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized 
> image file format (gdk-pixbuf-error-quark, 3)
> Abgebrochen

At a glance, this doesn't look like it means the program thinks the file
isn't present, but that it thinks the file is in an invalid format.

Have you confirmed that this file is in fact a valid PNG, and can be
opened and displayed correctly?

If it is, then I would suspect that something about GTK's ability to
recognize and load that file format has become broken. The error
messages from your compilation attempt seem to support that idea.

> After googling the error for two hours but don't finding any working 
> solution. I started to dig the problem down.
> Lucily, I had already build gtk+3.0-3.24.5 myself before (reason: 
> https://superuser.com/questions/1033414/how-to-disable-gtkfilechooserdialog-search), 
> so I have debug symbols there

<snip>

> gdk_pixbuf_new_from_stream is returning NULL. Unfortunately there are no 
> debug symbols in Debian for libgdk_pixbuf.

Are you sure?

$ apt-cache search libgdk-pixbuf | grep dbgsym
libgdk-pixbuf2.0-0-dbgsym - debug symbols for libgdk-pixbuf2.0-0
libgdk-pixbuf2.0-bin-dbgsym - debug symbols for libgdk-pixbuf2.0-bin

Admittedly it's not present by default; you have to add the appropriate
debug repository, then run 'apt-get update'. I have three of them
defined, but two of them commented out, so only one available in practice.

$ apt-cache policy libgdk-pixbuf2.0.0-dbgsym
libgdk-pixbuf2.0-0-dbgsym:
  Installed: (none)
  Candidate: 2.40.0+dfsg-5
  Version table:
     2.40.0+dfsg-5 500
        500 http://debug.mirrors.debian.org/debian-debug
testing-debug/main amd64 Packages

$ grep .-debug /etc/apt/sources.list
#deb http://debug.mirrors.debian.org/debian-debug/ stable-debug main
non-free contrib
deb http://debug.mirrors.debian.org/debian-debug/ testing-debug main
non-free contrib
#deb http://debug.mirrors.debian.org/debian-debug/ unstable-debug main
non-free contrib

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

[toc] | [prev] | [next] | [standalone]


#228569

FromGene Heskett <gheskett@shentel.net>
Date2020-11-11 14:20 +0100
Message-ID<B9Ycx-3HA-1@gated-at.bofh.it>
In reply to#228566
On Wednesday 11 November 2020 07:06:31 The Wanderer wrote:

> On 2020-11-11 at 06:12, Malte Marwedel wrote:
> > Hello,
> > since recently, several applications (firefox, pavucontrol,
> > pidgin...) fail to load images with gtk.
> > This happens when logging in as different user too, so its unlikely
> > this is a setting in the ~ directory.
> > The error message is as following:
> >
> > $ pavucontrol
> >
> > (process:13818): Gtk-WARNING **: 11:47:10.492: Locale not supported
> > by C library.
> >          Using the fallback 'C' locale.
> >
> > (pavucontrol:13818): Gtk-WARNING **: 11:47:10.592: Could not load a
> > pixbuf from icon theme.
> > This may indicate that pixbuf loaders or the mime database could not
> > be found.
> > **
> > Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gic
> >on: assertion failed (error == NULL): Failed to load
> > /usr/share/icons/Adwaita/16x16/status/image-missing.png:
> > Unrecognized image file format (gdk-pixbuf-error-quark, 3)
> > Abgebrochen
>
> At a glance, this doesn't look like it means the program thinks the
> file isn't present, but that it thinks the file is in an invalid
> format.
>
> Have you confirmed that this file is in fact a valid PNG, and can be
> opened and displayed correctly?
>
> If it is, then I would suspect that something about GTK's ability to
> recognize and load that file format has become broken. The error
> messages from your compilation attempt seem to support that idea.

I can verify that same failure, but stretch at least then falls back to 
gimp to display the image. Started at least a week ago. Seems to me I 
saw a libpixbuf update go by.

> > After googling the error for two hours but don't finding any working
> > solution. I started to dig the problem down.
> > Lucily, I had already build gtk+3.0-3.24.5 myself before (reason:
> > https://superuser.com/questions/1033414/how-to-disable-gtkfilechoose
> >rdialog-search), so I have debug symbols there
>
> <snip>
>
> > gdk_pixbuf_new_from_stream is returning NULL. Unfortunately there
> > are no debug symbols in Debian for libgdk_pixbuf.
>
> Are you sure?
>
> $ apt-cache search libgdk-pixbuf | grep dbgsym
> libgdk-pixbuf2.0-0-dbgsym - debug symbols for libgdk-pixbuf2.0-0
> libgdk-pixbuf2.0-bin-dbgsym - debug symbols for libgdk-pixbuf2.0-bin
>
> Admittedly it's not present by default; you have to add the
> appropriate debug repository, then run 'apt-get update'. I have three
> of them defined, but two of them commented out, so only one available
> in practice.
>
> $ apt-cache policy libgdk-pixbuf2.0.0-dbgsym
> libgdk-pixbuf2.0-0-dbgsym:
>   Installed: (none)
>   Candidate: 2.40.0+dfsg-5
>   Version table:
>      2.40.0+dfsg-5 500
>         500 http://debug.mirrors.debian.org/debian-debug
> testing-debug/main amd64 Packages
>
> $ grep .-debug /etc/apt/sources.list
> #deb http://debug.mirrors.debian.org/debian-debug/ stable-debug main
> non-free contrib
> deb http://debug.mirrors.debian.org/debian-debug/ testing-debug main
> non-free contrib
> #deb http://debug.mirrors.debian.org/debian-debug/ unstable-debug main
> non-free contrib


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web