qt5 applications crash when opening file chooser in gtk desktops

Bug #1838891 reported by djcj
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Issue is apparently related to qt5-gtk-platformtheme. When you're in a non-Qt desktop environment and you open a file selection dialog from a Qt app it crashes.

See also:
https://bugzilla.redhat.com/show_bug.cgi?id=1392605
https://bugs.archlinux.org/task/57984
https://github.com/TheAssassin/AppImageLauncher/issues/218

In my opinion this is a very serious issue and if newer Qt releases have fixed this it should be backported.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Can you please specify some more details about this issue:

1) Which Ubuntu release are you using? 18.04 (Bionic), 19.04 (Disco), 19.10 (Eoan) or some other?
2) What is the version of Qt package? I.e. the output of “apt policy qt5-gtk-platformtheme”.
3) What desktop environment does this happen on? Is this X11 or Wayland? If Wayland, is Qt using XWayland or running natively (does this happen when you run app with “-platform wayland”)?
4) What applications does this happen with? If this happens with many applications please name a few, so that I can look for crash logs in our error tracker.

Revision history for this message
djcj (djcj) wrote :

Ubuntu 18.04
qt5-gtk-platformtheme 5.9.5+dfsg-0ubuntu2.1
DE is Mate 1.20.0
It's X11, running with “-platform wayland” doesn't work: This application failed to start because it could not find or load the Qt platform plugin "wayland"
in "".

It happens with the thridparty app AppImageLauncher when I run "AppImageLauncher Settings": https://github.com/TheAssassin/AppImageLauncher
The devs of AppImageLauncher said it's a Qt related issue and not an issue with their program.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

I just managed to reproduce the crash locally. Just before the crash, the following lines are printed to stderr:

(AppImageLauncherSettings:27871): Gtk-WARNING **: 21:45:01.935: 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: Fatal error reading PNG image file: bad parameters to zlib (gdk-pixbuf-error-quark, 0)

I think most important part here is “bad parameters to zlib”. AppImageLauncher uses its own static zlib (lib/AppImageUpdate/lib/zsync2/lib/zlib/libzsync2_libz.a) which is incompatible with public zlib (/lib/x86_64-linux-gnu/libz.so.1) that GTK was compiled against.

Recompiling AppImageLauncher with system zlib should help, but I haven’t found a way to do that. I suggest you to ask AppImageLauncher developer about that.

Attaching a stacktrace for future reference.

Changed in qtbase-opensource-src (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.