Description of problem: When I try to run openttd, fontconfig crashes due to an assertion. https://github.com/freedesktop/fontconfig/blob/2.14.1/src/fccache.c#L808 Version-Release number of selected component (if applicable): $ rpm -qa | grep fontconfig fontconfig-2.14.1-2.fc37.x86_64 fontconfig-2.14.1-2.fc37.i686 fontconfig-devel-2.14.1-2.fc37.x86_64 fontconfig-debugsource-2.14.1-2.fc37.x86_64 $ rpm -qa | grep openttd openttd-opengfx-7.1-3.fc37.noarch openttd-12.2-4.fc37.x86_64 How reproducible: Run openttd Steps to Reproduce: 1. 2. 3. Actual results: Crash Expected results: Game runs. Additional info: I'm not sure why assertions are enabled in fontconfig.
Created attachment 1940295 [details] Crash log
Well, this is basically a memory-leak report in application. if it is 100% reproducible even after re-creating caches with fc-cache -f, it is a bug in openttd.
Try to run openttd with FC_DEBUG=16. you'll see more details then.
I already uploaded the log with `FC_DEBUG=16`. It is included in the attached file (zip file). Anyway, I'll check out why the memory leak happened.
What I can say is that 12 of reference count is too much. there should definitely be a memory leak in openttd, possibly not freed FcPattern which have a reference to those caches. check around code where use FcFontList or FcFontMatch in openttd.
Created attachment 1940410 [details] crash_gdb.log
If I modify openttd to force the use of X11, it works fine. ``` SDL_SetHint(SDL_HINT_VIDEODRIVER, "x11"); ``` It also works fine when I remove FcFini function calls from openttd. I ran gdb to understand what happened with the fontconfig call, and I attached the result. When SDL2 uses Wayland, Pango is also used, which uses fontconfig. By the way, I discovered that Pango calls FcInit but not FcFini. Also, FcInit is called from a thread other than the main thread, whereas openttd proceeds with all fontconfig-related function call on the main thread.
I don't think gdb helps you to find out memory leaks. what you need to run with openttd should be valgrind.
What I want to say is that Pango does not call FcFini, and openttd does not crash if Pango (and Wayland) is not used. If you think this is a Pango or openttd bug, please change the component.
Moving to openttd so far.
I've just pushed the update to 13.0. Can you check if this still happens? https://bodhi.fedoraproject.org/updates/FEDORA-2023-33d7773514
FEDORA-2023-1c2ee094a2 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-1c2ee094a2
FEDORA-2023-21b190cdf1 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-21b190cdf1
FEDORA-2023-fe8f70bcc8 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-fe8f70bcc8
FEDORA-2023-1c2ee094a2 has been pushed to the Fedora 38 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-1c2ee094a2 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-21b190cdf1 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-21b190cdf1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-21b190cdf1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-fe8f70bcc8 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-fe8f70bcc8` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-fe8f70bcc8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-1c2ee094a2 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-21b190cdf1 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-fe8f70bcc8 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.