hyprwm / Hypr

Hypr is a tiling window manager written in modern C++.
BSD 3-Clause "New" or "Revised" License
1.1k stars 33 forks source link

random rare crashes #34

Closed vaxerski closed 2 years ago

vaxerski commented 2 years ago

Random rare crashes occurring as a segfault at updateBar with GetHasFullscreenWindow

Coredump:

Stack trace of thread 2991:
                #0  0x00000000004642a6 _ZN10CWorkspace22getHasFullscreenWindowEv (Hypr + 0x642a6)
                #1  0x00000000004900a2 _ZN14CWindowManager13updateBarInfoEv (Hypr + 0x900a2)
                #2  0x000000000045b3bb _Z6handlePv (Hypr + 0x5b3bb)
                #3  0x00007f8992534905 n/a (libglib-2.0.so.0 + 0x84905)
                #4  0x00007f8993b55259 start_thread (libpthread.so.0 + 0x9259)
                #5  0x00007f899206d5e3 __clone (libc.so.6 + 0xfe5e3)

Offending code:

const auto WORKSPACE = getWorkspaceByID(activeWorkspaces[ConfigManager::getInt("bar:monitor") > monitors.size() ? 0 : ConfigManager::getInt("bar:monitor")]);
    if (WORKSPACE)
        message.fullscreenOnBar = WORKSPACE->getHasFullscreenWindow();
    else
        message.fullscreenOnBar = false;