I am trying to follow along with all of you but wondering if this is the same error.
$ cloudcompare.CloudCompare
QSocketNotifier: Can only be used with threads started with QThread
Gtk-Message: 21:49:04.756: Failed to load module ācanberra-gtk-moduleā
Gtk-Message: 21:49:04.790: Failed to load module ācolorreload-gtk-moduleā
Fontconfig warning: FcPattern object weight does not accept value [40 210)
Segmentation fault (core dumped)
This does not work for me on Manjaro KDE and trying to use CloudCompare:
rm ~/.cache/fontconfig/*
[somebody ~]$ fc-cache -r
[somebody ~]$ cloudcompare.CloudCompare
QSocketNotifier: Can only be used with threads started with QThread
Gtk-Message: 21:14:02.771: Failed to load module "canberra-gtk-module"
Gtk-Message: 21:14:02.806: Failed to load module "colorreload-gtk-module"
Fontconfig warning: FcPattern object weight does not accept value [40 210)
Segmentation fault (core dumped)
I know there is some ongoing work to make the snap caches private to respective snaps. @kenvandine did a PoC with Inkscape snap which worked well when I tried it. Perhaps he or @jamesh can comment on the current status.
@kenvandine@jamesh would love to learn more about your work and how you worked around this problem. Even if I have to hard-code a font into my app or something it would be a big improvement.
Any thoughts here? This is a big issue for my app as it makes my Snap unusable on Fedora and Manjaro for anyone who needs to open the file open dialog.
These commands worked for me except I got the āArgument list too longā error on the second command so I deleted the fontconfig dir and added an empty one. I am using Manjaro KDE. Thanks for this solution.
FWIW ā Saw this problem with stock Ubuntu 20.04 with a custom gnome theme installed (have no idea if that makes a difference ā just saying).
Again, this fixes it:
The snap that displays this problem for me is ānamegenā ā a GTK3-based random name generator. I have since taken it private until I have time to work this more carefully or until the solution is found.
I think Iām running into this on Ubuntu 20.04 when testing a 18.04-based rst2pdf snap before publishing (pull request here https://github.com/rst2pdf/rst2pdf/pull/928). The tool produces PDFs, so it does need to access the fonts on the userās system, and we know our user base has a mix of geekiness, so we canāt recommend people run command to clear their font caches as a general thing Is there a way to manage the font config/cache from within the snap so we can publish a new version? At the moment trying to do anything with fonts is producing FileNotFoundError: [Errno 2] No such file or directory: 'fc-match': 'fc-match' and no output. Advice gratefully received ā¦
If thereās a better way (or something integrated in the extensions) it would be very niceā¦
In a snap I maintain (the swi-prolog snap: https://snapcraft.io/swi-prolog) this issue appears from time to time, and while it can be solved by removing the fontconfig cache it is not convenient.
In my case the snap is using the kde-neon extension, if that makes any difference
well, it is not your configs but only the cached data (the cache gets automatically re-generated).
there have been fixes in various areas (snaps that use snapcraft extensions (i.e. the qt one or the gnome ones) should already behave fine, snaps that use the older desktop launchers and have not been re-built in a while might still be stuck on old behaviour though (thus my quetion above about āwhich snapsā))
Thanks @ogra. Looking at your github looks like you have made quite a few contributions to snap.
This fix has worked for me. Just to better uunderstand and to move towards a full resolution to this issue. Could you descibe the actual fault to me. I am sure that there is something we can suggest or build for snap to deal with this in a better way.