Open realSaltyFish opened 2 months ago
A quick brief look at this function suggests that this callback function calls std::vector::emplace_back()
, which is not thread-safe. Not sure if this is the actual problem though. I haven't written C++ in a while and am getting a bit rusty on it.
the event loop is single-threaded
Hyprland Version
System/Version info
```sh Hyprland, built from branch at commit cba1ade848feac44b2eda677503900639581c3f4 (props: bump version to 0.40.0). Date: Sat May 4 15:42:32 2024 Tag: v0.40.0, commits: 4606 flags: (if any) System Information: System name: Linux Node name: saltybook Release: 6.3.8-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Wed, 14 Jun 2023 20:10:31 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] [8086:46a6] (rev 0c) (prog-if 00 [VGA controller]) DeviceName: Second VGA os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: split-monitor-workspaces by Duckonaut ver 1.1.0 ```Bug or Regression?
Bug
Description
I have two external monitors connected through a dock to my laptop. When I plug/unplug the dock, depending on Hyprland version and luck, these things could happen randomly:
hyprctl monitors
, butcurrentFormat
isInvalid
and the monitor receives no video signal. The monitor becomes a "ghost". I cannot move windows or the cursor to it. I can still usehyprctl keyword
to change its configuration, but there is no way to bring it back to normal. Creating windows on the ghost monitor results in the window being placed on my builtin display, or the remaining good external monitor (if one is still alive - both could become ghosts).This looks very nondeterministic, so I think it's likely synchronization-related (internal data structure corrupt?). Everything is good if I plug/unplug the monitors one by one.
BTW, I cloned Hyprland and played around. I made a debug build but its crash reports do not include a stack trace. Core dump files do not have line numbers and symbol information (all function calls are shown as question marks), so was not really helpful for my investigation. Did I miss something?
How to reproduce
Use 0.40.0 or latest commit. This is reproducible with default configuration.
Crash reports, logs, images, videos
hyprlandCrashReport47616.txt hyprlandCrashReport469023.txt I attached two crash reports. One of them segfaulted because of an IPC call. My AGS bar uses IPC to get workspace info from Hyprland. I restarted Hyprland without the bar running, and got the other crash report which failed on something else.
This issue is very versatile and I don't know what else I should upload here. I did a ton of testing and got a ton of log files and crash reports. Let me know if you are interested in any specific scenarios. I'll do my best to gather more specific info.