Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.4k stars 696 forks source link

Unplugging and Replugging Laptop Crashes Waybar #3275

Closed ZaheenJ closed 3 months ago

ZaheenJ commented 4 months ago

Unplugging my laptop, waiting a few seconds, and then replugging my laptop consistently crashes waybar. Even after disabling the battery module, waybar still crashes. This could be related to #2519 and #2662. #2704 may solve this until inotify can possibly be replaced with netlink or upower events. The upower module would actually be perfect if it had format-charging like the battery module has.

Waybar Version: 0.10.3 Output:

[2024-05-15 15:31:26.609] [info] Using configuration file /home/zaheen/.config/waybar/config.jsonc
[2024-05-15 15:31:26.610] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
[2024-05-15 15:31:26.610] [info] Using CSS file /home/zaheen/.config/waybar/style.css
[2024-05-15 15:31:26.637] [info] Hyprland IPC starting
[2024-05-15 15:31:26.637] [warning] $XDG_RUNTIME_DIR/hypr does not exist, falling back to /tmp/hypr
[2024-05-15 15:31:26.638] [info] Loading persistent workspaces from Waybar config
[2024-05-15 15:31:26.638] [info] Loading persistent workspaces from Hyprland workspace rules
[2024-05-15 15:31:26.672] [info] Loading persistent workspaces from Waybar config
[2024-05-15 15:31:26.672] [info] Loading persistent workspaces from Hyprland workspace rules
[2024-05-15 15:31:27.014] [info] Bar configured (width: 1900, height: 22) for output: eDP-1
[2024-05-15 15:31:27.014] [info] Bar configured (width: 1900, height: 22) for output: HDMI-A-1
[2024-05-15 15:31:27.051] [warning] Requested height: 22 is less than the minimum height: 23 required by the modules
[2024-05-15 15:31:27.051] [info] Bar configured (width: 1900, height: 23) for output: eDP-1
[2024-05-15 15:31:27.085] [warning] Requested height: 22 is less than the minimum height: 23 required by the modules
[2024-05-15 15:31:27.085] [info] Bar configured (width: 1900, height: 23) for output: HDMI-A-1
[2024-05-15 15:31:27.156] [warning] Requested height: 23 is less than the minimum height: 24 required by the modules
[2024-05-15 15:31:27.156] [info] Bar configured (width: 1900, height: 24) for output: eDP-1
[2024-05-15 15:31:27.215] [warning] Requested height: 23 is less than the minimum height: 24 required by the modules
[2024-05-15 15:31:27.215] [info] Bar configured (width: 1900, height: 24) for output: HDMI-A-1
/usr/include/c++/13.2.1/bits/stl_vector.h:1128: constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::tuple<long unsigned int, long unsigned int>; _Alloc = std::allocator<std::tuple<long unsigned int, long unsigned int> >; reference = std::tuple<long unsigned int, long unsigned int>&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
fish: Job 1, 'waybar' terminated by signal SIGABRT (Abort)
LukashonakV commented 4 months ago

Hi @ZaheenJ , for UPower features it's better to open feature issue.

ZaheenJ commented 4 months ago

Even with the battery module and upower modules disabled, replugging the laptop crashed Waybar which should not happen. I don't have access to the original computer on which the crash occurred, but I can't seem to reproduce the issue on my M1 Macbook on Asahi Linux. I can try debugging more when I have access to the other laptop in about two weeks.

ZaheenJ commented 3 months ago

Can't seem to reproduce anymore.