https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Bug ID: 2164233 Summary: FcCacheFini: Assertion `fcCacheChains[i] == NULL' failed. Product: Fedora Version: 37 Status: NEW Component: fontconfig Assignee: tagoh@redhat.com Reporter: byoungchan.lee@gmx.com QA Contact: extras-qa@fedoraproject.org CC: ajax@redhat.com, fonts-bugs@lists.fedoraproject.org, gnome-sig@lists.fedoraproject.org, i18n-bugs@lists.fedoraproject.org, mclasen@redhat.com, pnemade@redhat.com, rstrode@redhat.com, sandmann@redhat.com, tagoh@redhat.com Target Milestone: --- Classification: Fedora
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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #1 from Byoungchan Lee byoungchan.lee@gmx.com --- Created attachment 1940295 --> https://bugzilla.redhat.com/attachment.cgi?id=1940295&action=edit Crash log
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Akira TAGOH tagoh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Doc Type|--- |If docs needed, set a value
--- Comment #2 from Akira TAGOH tagoh@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #3 from Akira TAGOH tagoh@redhat.com --- Try to run openttd with FC_DEBUG=16. you'll see more details then.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #4 from Byoungchan Lee byoungchan.lee@gmx.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #5 from Akira TAGOH tagoh@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #7 from Byoungchan Lee byoungchan.lee@gmx.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #8 from Akira TAGOH tagoh@redhat.com --- I don't think gdb helps you to find out memory leaks. what you need to run with openttd should be valgrind.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #9 from Byoungchan Lee byoungchan.lee@gmx.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Akira TAGOH tagoh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|fontconfig |openttd CC| |felix@kaechele.ca Assignee|tagoh@redhat.com |felix@kaechele.ca
--- Comment #10 from Akira TAGOH tagoh@redhat.com --- Moving to openttd so far.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Felix Kaechele felix@kaechele.ca changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #11 from Felix Kaechele felix@kaechele.ca --- I've just pushed the update to 13.0. Can you check if this still happens?
https://bodhi.fedoraproject.org/updates/FEDORA-2023-33d7773514
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
--- Comment #12 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-1c2ee094a2 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-1c2ee094a2
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #13 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-21b190cdf1 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-21b190cdf1
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #14 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-fe8f70bcc8 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-fe8f70bcc8
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #15 from Fedora Update System updates@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #16 from Fedora Update System updates@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
--- Comment #17 from Fedora Update System updates@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version| |openttd-13.1-1.fc38 Status|ON_QA |CLOSED Resolution|--- |ERRATA Last Closed| |2023-04-22 00:46:50
--- Comment #18 from Fedora Update System updates@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|openttd-13.1-1.fc38 |openttd-13.1-1.fc38 | |openttd-13.1-1.fc37
--- Comment #19 from Fedora Update System updates@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=2164233
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|openttd-13.1-1.fc38 |openttd-13.1-1.fc38 |openttd-13.1-1.fc37 |openttd-13.1-1.fc37 | |openttd-13.1-1.fc36
--- Comment #20 from Fedora Update System updates@fedoraproject.org --- 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.
i18n-bugs@lists.fedoraproject.org