3

I am currently running into a major issue with my Ubuntu 20.04.2 installation, where I cannot use any Ubuntu-native program (such as the Software Center, file manager and so on) and no icons are displayed on the side screen. When I try to run any of this program, such as gedit, on the terminal, I get the following error:

(gedit:5943): Gtk-WARNING **: 21:11:57.857: 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/Yaru/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Aborted (core dumped)

I read on some other questions that the issue might come from permissions being set incorrectly for /usr/share/mime, so I checked the values by using ls -l usr/share/mime. I got the following output:

total 436
-rw-r--r-- 1 root root  11177 Feb 23 20:56 aliases
drwxr-xr-x 2 root root  24576 Feb 23 20:56 application
drwxr-xr-x 2 root root   4096 Feb 23 20:56 audio
drwxr-xr-x 2 root root   4096 Feb 23 20:56 font
-rw-r--r-- 1 root root  21828 Feb 23 20:56 generic-icons
-rw-r--r-- 1 root root  34871 Feb 23 20:56 globs
-rw-r--r-- 1 root root  38586 Feb 23 20:56 globs2
-rw-r--r-- 1 root root     64 Feb 23 20:56 icons
drwxr-xr-x 2 root root   4096 Feb 23 20:56 image
drwxr-xr-x 2 root root  12288 Feb 23 20:56 inode
-rw-r--r-- 1 root root  31277 Feb 23 20:56 magic
drwxr-xr-x 2 root root   4096 Feb 23 20:56 message
-rw-r--r-- 1 root root 153872 Feb 23 20:56 mime.cache
drwxr-xr-x 2 root root   4096 Feb 23 20:56 model
drwxr-xr-x 2 root root   4096 Feb 23 20:56 multipart
drwxr-xr-x 2 root root   4096 Feb 22 17:02 packages
-rw-r--r-- 1 root root  18906 Feb 23 20:56 subclasses
drwxr-xr-x 2 root root   4096 Feb 23 20:56 text
-rw-r--r-- 1 root root   1140 Feb 23 20:56 treemagic
-rw-r--r-- 1 root root  22550 Feb 23 20:56 types
-rw-r--r-- 1 root root      5 Feb 23 20:56 version
drwxr-xr-x 2 root root   4096 Feb 23 20:56 video
drwxr-xr-x 2 root root   4096 Feb 23 20:56 x-content
drwxr-xr-x 2 root root   4096 Feb 23 20:56 x-epoc
-rw-r--r-- 1 root root   1775 Feb 23 20:56 XMLnamespaces

If I understand the output correctly, any user is allowed to read these files, so I'm not sure what else could cause this error. Could someone help me track the source of the error?

Pablo Bianchi
  • 15,657
Rognar
  • 31
  • 1
    Does this answer your question? Ubuntu software center isn't opening!. Also try sudo update-mime-database /usr/share/mime; sudo gdk-pixbuf-query-loaders --update-cache – Pablo Bianchi Feb 23 '21 at 20:32
  • Thanks for your answer! By using the first solution, I am able to run the Software Center again, but otherwise no changes regarding the other softwares. As for the commands you provided me, I am unable to run gdk-pixbuf-query-loaders, even though I have libgdk-pixbuf2.0-dev installed. Am I missing another library?

    Also, when I try to run an update by using sudo apt update, I get the following error,:

    W: Target DEP-11-icons-hidpi (main/dep11/icons-64x64@2.tar) is configured multiple times in /etc/apt/sources.list.d/msprod.list:1 and /etc/apt/sources.list.d/mssql-release.list:1

    – Rognar Feb 23 '21 at 21:05
  • Try the classic sudo apt install --fix-broken and sudo snap refresh – Pablo Bianchi Feb 23 '21 at 22:24
  • Thank you again for your help. I am still facing the same issue regarding the GTK error. By looking at the source code of the file mentioned in the error (https://code.woboq.org/gtk/gtk/gtk/gtkiconhelper.c.html#100destination), I was wondering if the error might be triggered by an issue with the destination variable (around line 494) that might be erroneous. I looked for the image-missing.png file, and it is right where it is supposed to be, but I'm not sure where the code is looking for it – Rognar Feb 27 '21 at 09:42

1 Answers1

3

Reinstall libgdk-pixbuf2.0-0:

sudo apt reinstall libgdk-pixbuf2.0-0
arberx
  • 31