Skip to content

hyprland-dialog / libhyprtoolkit segfault in CSystemIconFactory::parseTheme (infinite recursion) when shown as "app not responding" watchdog for a GTK file picker #124

Description

@Phoveous-arch-user

Environment

  • hyprland 0.56.2-1
  • hyprtoolkit 0.5.4-4
  • hyprgraphics 0.5.1-4
  • xdg-desktop-portal-hyprland 1.4.1-1
  • quickshell 0.3.0-2
  • Arch Linux

Description

hyprland-dialog (the "Application Not Responding" watchdog dialog) segfaults instead of displaying, whenever it's triggered by an app whose file-open portal request has hung. This happened 3 separate times in one session, always via the same trigger.

Steps to reproduce

  1. Open an app that requests a GTK/portal file picker over Wayland (in my case: Lutris → Install a game → "Select an EXE or MSI file")
  2. The underlying request hangs (the app appears frozen)
  3. Hyprland's watchdog fires and tries to show the "Application Not Responding" dialog
  4. hyprland-dialog itself crashes with SIGSEGV instead of displaying

Notes

  • Ruled out icon theme as the cause: my icon theme is kora, which has a clean, non-circular Inherits=breeze,hicolor. Switching to Adwaita did NOT fix the crash.
  • The crash backtrace shows deep, repeating recursion in CSystemIconFactory::parseTheme → parseThemes → parseTheme (60+ frames), consistent with unbounded recursion in the icon theme resolution path.
  • The underlying trigger (the app hanging in the first place, prompting the watchdog) may be a separate but related bug in xdg-desktop-portal-hyprland — I've also seen unrelated xdg-desktop-portal-hyprland SIGSEGV crashes in my coredump history on other days.

Backtrace (coredumpctl info hyprland-dialog)

PID: 45983 (hyprland-dialog)
TID: 45983 (hyprland-dialog)
UID: 1000 (senuka)
GID: 1000 (senuka)
Signal: 11 (SEGV) si_code: SEGV_MAPERR
Timestamp: Tue 2026-08-18 10:46:25 +0530
Command Line: hyprland-dialog --title 'Application Not Responding' --text 'An application Select an EXE or MSI file - net.lutris.Lutris is not responding.
What do you want to do with it?' --buttons 'Terminate;Wait'
Executable: /usr/bin/hyprland-dialog
Signal: 11 (SEGV) si_code: SEGV_MAPERR

Stack trace of thread 45983:
#0  0x00007f1f4105d15b n/a (libhyprtoolkit.so.5 + 0x6515b)
#1  0x00007f1f410dd0d3 _ZNSt8__format10_Arg_valueISt20basic_format_contextINS_10_Sink_iterIcEEcEE6handle9_S_formatIKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISE_EEEEvRSt26basic_format_parse_contextIcERS4_PKv (libhyprtoolkit.so.5 + 0xe50d3)
#2  0x00007f1f4105db44 n/a (libhyprtoolkit.so.5 + 0x65b44)
#3  0x00007f1f41061c9d n/a (libhyprtoolkit.so.5 + 0x69c9d)
#4  0x00007f1f4106369d n/a (libhyprtoolkit.so.5 + 0x6b69d)
#5  0x00007f1f410e2e69 _ZN11Hyprtoolkit18CSystemIconFactory10parseThemeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE (libhyprtoolkit.so.5 + 0xeae69)
#6  0x00007f1f410e3b20 _ZN11Hyprtoolkit18CSystemIconFactory11parseThemesERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE (libhyprtoolkit.so.5 + 0xebb20)
#7  0x00007f1f410e2eec _ZN11Hyprtoolkit18CSystemIconFactory10parseThemeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE (libhyprtoolkit.so.5 + 0xeaeec)
#8  0x00007f1f410e3b20 _ZN11Hyprtoolkit18CSystemIconFactory11parseThemesERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE (libhyprtoolkit.so.5 + 0xebb20)
[... frames #9 through #63 repeat the same parseTheme ↔ parseThemes cycle ...]
#63 0x00007f1f410e3b20 _ZN11Hyprtoolkit18CSystemIconFactory11parseThemesERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE (libhyprtoolkit.so.5 + 0xebb20)

Stack trace of thread 45984:
#0  0x00007f1f408a0952 n/a (libc.so.6 + 0xa0952)
#1  0x00007f1f40894cd9 n/a (libc.so.6 + 0x94cd9)
#2  0x00007f1f408979cc pthread_cond_clockwait (libc.so.6 + 0x979cc)
#3  0x00007f1f4041f3b8 _ZN12Hyprgraphics22CAsyncResourceGatherer18asyncAssetSpinLockEv (libhyprgraphics.so.4 + 0x263b8)
#4  0x00007f1f40cea859 n/a (libstdc++.so.6 + 0xea859)
#5  0x00007f1f408980a2 n/a (libc.so.6 + 0x980a2)
#6  0x00007f1f4092080c n/a (libc.so.6 + 0x12080c)

ELF object binary architecture: AMD x86-64

Activity

  1. vaxerski commented on Aug 20, 2026

    @vaxerski
    Member

    Open an app that requests a GTK/portal file picker over Wayland (in my case: Lutris → Install a game → "Select an EXE or MSI file")

    that doesn't even touch hyprland... I have no idea what's going on

  2. BlueZeeKing commented on Aug 23, 2026

    @BlueZeeKing
    Contributor

    Does this also happen when running a hyprtoolkit app with icons in other cases?

  3. evandrojr commented on Sep 19, 2026

    @evandrojr

    Same crash on a current install (hyprtoolkit 0.5.4-5, Arch; hyprland-dialog watchdog for a hung mpv), and I can pin down the trigger.

    Repro/root cause: ~/.local/share/icons/hicolor/index.theme contains Inherits=hicolor (self-inheritance). parseTheme("hicolor") -> parseThemes([hicolor]) -> parseTheme("hicolor") -> ... until the stack overflows (identical 60+ frame parseTheme <-> parseThemes recursion, SEGV_MAPERR on the stack guard page). Walking every index.theme on the XDG search path shows the only cycle is that self-inherit; the system /usr/share/icons/hicolor has no Inherits, but the user-level theme shadows it (user dirs come first).

    Why it crashes despite #82 being "closed": the #83 guard merged 2026-05-22, but v0.5.4 (2026-05-02) predates it — the v0.5.4 parseTheme has no "already parsed" skip before recursing into parseThemes. The guard only exists on main/v0.6.0. So every 0.5.4-based release still stack-overflows on any cyclic theme graph through the user path.

    Ask: ship the #83 guard — Arch currently carries 0.5.4-5; a bump to >= v0.6.0 (or a 0.5.x backport) ends this class of crashes. Also, given #124's active theme (kora) was clean, there's likely a second cycle elsewhere in that reporter's resolved graph (a user-level hicolor shadow is the classic hidden source) — worth them re-checking.

    Filed by big-pickle via opencode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions