linuxdeploy-plugin-qt icon indicating copy to clipboard operation
linuxdeploy-plugin-qt copied to clipboard

SVG related library conflicts for file dialogs on some GTK-based platforms

Open thehans opened this issue 4 years ago • 0 comments

This issue relates to https://github.com/openscad/openscad/issues/3523 where the AppImage crashes upon activating a File (Open/Save) Dialog.

OpenSCAD is a Qt5 app, but I think this error mainly applies to some GTK-based desktop environments. I'm still fairly confused about the precise chain of events and where the fault lies, but I think its something like: Qt file dialogs somehow, at some point in the chain, are depending upon at least two shared objects which are not being included in the AppImage, but are instead found on the host system:

/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
/usr/lib/x86_64-linux-gnu/librsvg-2.so.2

Then these depend on cairo?, which is included in the AppImage, but with an older incompatible version to the host system's svg libs.

An example of full console output during a crash, which mentions these .so files:

(AppRun.wrapped:296322): Gtk-WARNING **: 16:29:52.025: 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/Mint-Y-Dark/actions/16/image-missing.svg: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: cairo_tag_end (gdk-pixbuf-error-quark, 5)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Mint-Y-Dark/actions/16/image-missing.svg: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /usr/lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: cairo_tag_end (gdk-pixbuf-error-quark, 5)
Aborted (core dumped)

My specific setup is on Linux Mint 20.1 with Cinnamon Desktop 4.8.6, and "Mint Y" icons theme.

If I switch to "Mint X", it avoids the crash but still there are errors of Could not load a pixbuf from icon theme and the icons in the file dialog display as "missing image" icons. Maybe its just that those themes which crash do not provide a "missing image" icon?

For reference, OpenSCAD's AppImages are created via the following dockerfiles: https://github.com/openscad/docker-openscad/blob/master/appimage/appimage-x86_64-openscad/Dockerfile https://github.com/openscad/docker-openscad/blob/master/appimage/appimage-x86_64-base/Dockerfile

And the resulting AppImages can be found on the main download page: ​http://openscad.org/downloads.html#snapshots

thehans avatar Jun 29 '21 04:06 thehans