[BUG] AppImage startup crash (SIGSEGV) in FcCharSetHasChar (libfontconfig) during QML text initialization #833
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
stale
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-streetpea/chiaki-ng#833
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
When launching the
chiaki-ngAppImage on Debian, the application crashed immediately with aSegmentation 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 hostlibfontconfigbinary caches in~/.cache/fontconfig/.Debug Log
To Reproduce
Steps to reproduce the behavior:
chiaki-ngAppImage on Debian GNU/Linux with an existing shared user font cache.libplaceboand Vulkan instance initialization to complete.SIGSEGVcrash 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:
Additional context
Root Cause Analysis: The AppImage bundles
libQt6Gui.so.6andlibQt6Quick.so.6, but depends on the host system'slibfontconfig.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 whenlibfontconfigparses binary font caches viammap(). WhenFcCharSetHasChar()attempts to dereference these offsets to look up character sets, it triggers aSIGSEGV.Temporary workaround: Wiping and rebuilding the host user font cache fixes the crash temporarily, i.e.:
However, this issue eventually reoccurs after system package updates or cache rewrites by host applications.
XDG_CACHE_HOMEor shipping a dedicatedfonts.confwith AppImage-specific cache paths) to avoid binary font cache collisions between the bundled Qt stack and the host system.