[BUG] AppImage startup crash (SIGSEGV) in FcCharSetHasChar (libfontconfig) during QML text initialization #833

Open
opened 2026-10-05 06:20:18 -05:00 by Zonkil9 · 0 comments
Zonkil9 commented 2026-10-05 06:20:18 -05:00 (Migrated from github.com)

Describe the bug
When launching the chiaki-ng AppImage on Debian, the application crashed immediately with a Segmentation fault (SIGSEGV) during QML/Qt6 text initialization right after libplacebo and Vulkan finish initialization, before the main window appears.

Debugging via GDB reveals that the crash occurs in FcCharSetHasChar() inside the host system's /lib/x86_64-linux-gnu/libfontconfig.so.1. This happens when bundled Qt6 GUI components attempt to query font glyphs through host libfontconfig binary caches in ~/.cache/fontconfig/.

Debug Log

  • Terminal output up to the crash:
chiaki-ng
chiaki.gui: [libplacebo] Initialized libplacebo v7.360.1 (v7.360.1) (API v360)
chiaki.gui: [libplacebo] Creating vulkan instance with extensions:
...
chiaki.gui: [libplacebo] Probing for vulkan devices:
chiaki.gui: [libplacebo]     GPU 0: Intel(R) Iris(R) Xe Graphics (TGL GT2) v1.4.305 (integrated)
...
chiaki.gui: [libplacebo] Registering hook pass: sub-pixel convolution 1
chiaki.gui: [libplacebo] Registering hook pass: aggregation
Segmentation fault (core dumped)
  • GDB stack trace:
(gdb) bt
#0  0x00007fffe89276b1 in ?? () from /lib/x86_64-linux-gnu/libfontconfig.so.1
#1  0x00007fffe89283b1 in FcCharSetHasChar () from /lib/x86_64-linux-gnu/libfontconfig.so.1
#2  0x00007fffe9cd80ec in QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int, unsigned int) const ()
   from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Gui.so.6
#3  0x00007fffe9ac3bda in QFontEngineMulti::stringToCMap(QChar const*, int, QGlyphLayout*, int*, QFlags<QFontEngine::ShaperFlag>) const ()
   from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Gui.so.6
#4  0x00007fffe9b3f087 in QTextEngine::shapeText(int) const () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Gui.so.6
#5  0x00007fffe9b6b753 in QTextLine::layout_helper(int) () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Gui.so.6
#6  0x00007fffea475160 in QQuickTextPrivate::setLineGeometry(QTextLine&, double, double&) ()
   from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Quick.so.6
#7  0x00007fffea476048 in QQuickTextPrivate::setupTextLayout(double*) () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Quick.so.6
#8  0x00007fffea4782d0 in QQuickTextPrivate::updateSize() () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Quick.so.6
#9  0x00007fffea478cae in QQuickTextPrivate::getImplicitWidth() const () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Quick.so.6
...
#15 0x00007fff7b7699c3 in non-virtual thunk to QQuickIconLabel::componentComplete() ()
   from /tmp/.mount_chiakidCDOIc/usr/qml/QtQuick/Controls/../../../lib/libQt6QuickControls2Impl.so.6
#16 0x00007fffe91b3614 in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) ()
   from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Qml.so.6

To Reproduce
Steps to reproduce the behavior:

  1. Launch chiaki-ng AppImage on Debian GNU/Linux with an existing shared user font cache.
  2. Wait for libplacebo and Vulkan instance initialization to complete.
  3. Observe immediate SIGSEGV crash before the main window is rendered.

Expected behavior
The application should load and render the main Qt6/QML window without crashing on font resolution or host font cache discrepancies.

Desktop:

  • OS: Debian GNU/Linux
  • Version: 13 (Trixie)
  • Device: Laptop (Intel Iris Xe Graphics + NVIDIA GeForce MX450)
  • chiaki-ng Version: 1.10.0 (Linux x86_64 AppImage)

Additional context

  • Root Cause Analysis: The AppImage bundles libQt6Gui.so.6 and libQt6Quick.so.6, but depends on the host system's libfontconfig.so.1. Because both the bundled Qt6 engine and the host environment share the same user cache directory (~/.cache/fontconfig/), differences in library builds or interrupted cache writes result in invalid memory offsets when libfontconfig parses binary font caches via mmap(). When FcCharSetHasChar() attempts to dereference these offsets to look up character sets, it triggers a SIGSEGV.

  • Temporary workaround: Wiping and rebuilding the host user font cache fixes the crash temporarily, i.e.:

rm -rf ~/.cache/fontconfig && fc-cache -r -v

However, this issue eventually reoccurs after system package updates or cache rewrites by host applications.

  • Suggested packaging fix: Consider isolating font configuration or scoping font cache paths inside the AppImage's AppRun wrapper (e.g., scoping XDG_CACHE_HOME or shipping a dedicated fonts.conf with AppImage-specific cache paths) to avoid binary font cache collisions between the bundled Qt stack and the host system.
**Describe the bug** When launching the `chiaki-ng` AppImage on Debian, the application crashed immediately with a `Segmentation fault` (`SIGSEGV`) during QML/Qt6 text initialization right after libplacebo and Vulkan finish initialization, before the main window appears. Debugging via GDB reveals that the crash occurs in `FcCharSetHasChar()` inside the host system's `/lib/x86_64-linux-gnu/libfontconfig.so.1`. This happens when bundled Qt6 GUI components attempt to query font glyphs through host `libfontconfig` binary caches in `~/.cache/fontconfig/`. **Debug Log** - Terminal output up to the crash: ``` chiaki-ng chiaki.gui: [libplacebo] Initialized libplacebo v7.360.1 (v7.360.1) (API v360) chiaki.gui: [libplacebo] Creating vulkan instance with extensions: ... chiaki.gui: [libplacebo] Probing for vulkan devices: chiaki.gui: [libplacebo] GPU 0: Intel(R) Iris(R) Xe Graphics (TGL GT2) v1.4.305 (integrated) ... chiaki.gui: [libplacebo] Registering hook pass: sub-pixel convolution 1 chiaki.gui: [libplacebo] Registering hook pass: aggregation Segmentation fault (core dumped) ``` - GDB stack trace: ``` (gdb) bt #0 0x00007fffe89276b1 in ?? () from /lib/x86_64-linux-gnu/libfontconfig.so.1 #1 0x00007fffe89283b1 in FcCharSetHasChar () from /lib/x86_64-linux-gnu/libfontconfig.so.1 #2 0x00007fffe9cd80ec in QFontEngineMultiFontConfig::shouldLoadFontEngineForCharacter(int, unsigned int) const () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Gui.so.6 #3 0x00007fffe9ac3bda in QFontEngineMulti::stringToCMap(QChar const*, int, QGlyphLayout*, int*, QFlags<QFontEngine::ShaperFlag>) const () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Gui.so.6 #4 0x00007fffe9b3f087 in QTextEngine::shapeText(int) const () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Gui.so.6 #5 0x00007fffe9b6b753 in QTextLine::layout_helper(int) () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Gui.so.6 #6 0x00007fffea475160 in QQuickTextPrivate::setLineGeometry(QTextLine&, double, double&) () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Quick.so.6 #7 0x00007fffea476048 in QQuickTextPrivate::setupTextLayout(double*) () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Quick.so.6 #8 0x00007fffea4782d0 in QQuickTextPrivate::updateSize() () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Quick.so.6 #9 0x00007fffea478cae in QQuickTextPrivate::getImplicitWidth() const () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Quick.so.6 ... #15 0x00007fff7b7699c3 in non-virtual thunk to QQuickIconLabel::componentComplete() () from /tmp/.mount_chiakidCDOIc/usr/qml/QtQuick/Controls/../../../lib/libQt6QuickControls2Impl.so.6 #16 0x00007fffe91b3614 in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) () from /tmp/.mount_chiakidCDOIc/usr/bin/../lib/libQt6Qml.so.6 ``` **To Reproduce** Steps to reproduce the behavior: 1. Launch `chiaki-ng` AppImage on Debian GNU/Linux with an existing shared user font cache. 2. Wait for `libplacebo` and Vulkan instance initialization to complete. 3. Observe immediate `SIGSEGV` crash before the main window is rendered. **Expected behavior** The application should load and render the main Qt6/QML window without crashing on font resolution or host font cache discrepancies. **Desktop:** - OS: Debian GNU/Linux - Version: 13 (Trixie) - Device: Laptop (Intel Iris Xe Graphics + NVIDIA GeForce MX450) - chiaki-ng Version: 1.10.0 (Linux x86_64 AppImage) **Additional context** - Root Cause Analysis: The AppImage bundles `libQt6Gui.so.6` and `libQt6Quick.so.6`, but depends on the host system's `libfontconfig.so.1`. Because both the bundled Qt6 engine and the host environment share the same user cache directory (`~/.cache/fontconfig/`), differences in library builds or interrupted cache writes result in invalid memory offsets when `libfontconfig` parses binary font caches via `mmap()`. When `FcCharSetHasChar()` attempts to dereference these offsets to look up character sets, it triggers a `SIGSEGV`. - Temporary workaround: Wiping and rebuilding the host user font cache fixes the crash temporarily, i.e.: ```bash rm -rf ~/.cache/fontconfig && fc-cache -r -v ``` However, this issue eventually reoccurs after system package updates or cache rewrites by host applications. - Suggested packaging fix: Consider isolating font configuration or scoping font cache paths inside the AppImage's AppRun wrapper (e.g., scoping `XDG_CACHE_HOME` or shipping a dedicated `fonts.conf` with AppImage-specific cache paths) to avoid binary font cache collisions between the bundled Qt stack and the host system.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-streetpea/chiaki-ng#833
No description provided.