On Rocky Linux 8 and 9, I encounter a problem, my Qt/C++ application crashes due to some actions that require to open a QFileDialog with the message:
(myapp:2992): Gtk-WARNING **: 14:52:45.518: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Adwaita/16x16/status/image-missing.png: Fatal error reading PNG image file: bad parameters to zlib (gdk-pixbuf-error-quark, 0)
Abandon (core dumped)
The file /usr/share/icons/Adwaita/16x16/status/image-missing.png exists provided by the official package adwaita-icon-theme
$ ls -li /usr/share/icons/Adwaita/16x16/status/image-missing.png
309636 -rwxrwxrwx. 1 etude etude 405 Apr 21 2022 /usr/share/icons/Adwaita/16x16/status/image-missing.png
Furthermore, my application does not crash when iit is launched with sudo, or when it is launched using a remote X11 server.
More information:
- Linux version: Rocky Linux 8.8 or 9.1
- Qt5 version: 5.15.3
I've already tried to:
- Change the permissions on then repository /usr/share/mime:
$ sudo chmod -R 777 /usr/share/mime
- Update the mime database:
$ sudo update-mime-database /usr/share/mime
- Update the cache using:
$ sudo gdk-pixbuf-query-loaders-64 --update-cache