rcaelers / workrave

Workrave is a program that assists in the recovery and prevention of Repetitive Strain Injury (RSI). The program frequently alerts you to take micro-pauses, rest breaks and restricts you to your daily limit.
https://www.workrave.org
GNU General Public License v3.0
1.61k stars 204 forks source link

Workrave dies on wlroots compositors when break starts #550

Closed jjramsey closed 5 months ago

jjramsey commented 5 months ago

Describe the bug Workrave dies on LabWC (0.7.2-1) and Sway (1:1.9-3) when the window for microbreak is just about to come up.

To Reproduce Steps to reproduce the behavior:

  1. Open a LabWC or Sway session.
  2. Start Workrave
  3. Stay active (e.g. move mouse and type at keyboard) so that the timer for the microbreak reaches its limit and the microbreak should start.

Expected behavior Workrave should bring up the window starting the microbreak.

Linux (please complete the following information in case you encountered the bug on Linux):

Additional context This doesn't happen on KDE.

These are the messages I get when running Wayland from a terminal in LabWC:

[2024-06-24 21:33:42.410] [workrave] [info ] Workrave started
[2024-06-24 21:33:42.410] [workrave] [info ] Log file: /home/jjramsey/.cache/workrave/workrave.log
[2024-06-24 21:33:42.412] [workrave] [info ] State directory = /home/jjramsey/.workrave
[2024-06-24 21:33:42.412] [workrave] [info ] Config directory = /home/jjramsey/.config/workrave
[2024-06-24 21:33:42.412] [workrave] [info ] Log directory = /home/jjramsey/.cache/workrave
[2024-06-24 21:33:42.412] [workrave] [info ] Home directory = /home/jjramsey
[2024-06-24 21:33:42.412] [workrave] [info ] Application directory = 
[2024-06-24 21:33:42.536] [toolkit] [info ] Toolkit reported # displays : 1
[2024-06-24 21:33:42.536] [toolkit] [info ] Display #0: primary=false x=0 y=0 w=1920 h=1080
[2024-06-24 21:33:42.536] [workrave] [info ] Started plugin: workrave.GenericDBusApplet
[2024-06-24 21:33:42.536] [workrave] [info ] Started plugin: workrave.GnomeSession
[2024-06-24 21:33:42.539] [workrave] [info ] Started plugin: workrave.LoginSession
[2024-06-24 21:33:42.540] [workrave] [info ] Started plugin: workrave.X11SystrayAppletWindow
[2024-06-24 21:33:42.541] [workrave] [info ] Started plugin: workrave.DbusMenu
[2024-06-24 21:33:42.541] [workrave] [info ] Started plugin: workrave.AppIndicatorMenu
[2024-06-24 21:33:42.542] [workrave] [info ] AppIndicatorMenu: disconnected

(workrave:141278): Gtk-CRITICAL **: 21:33:42.649: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
[2024-06-24 21:40:03.089] [toolkit] [info ] Toolkit reported # displays : 1
[2024-06-24 21:40:03.089] [toolkit] [info ] Display #0: primary=false x=0 y=0 w=1920 h=1080
[2024-06-24 21:40:03.090] [toolkit] [info ] Toolkit reported # displays : 1
[2024-06-24 21:40:12.102] [toolkit] [info ] Toolkit reported # displays : 1
[2024-06-24 21:40:12.102] [toolkit] [info ] Display #0: primary=false x=0 y=0 w=1920 h=1080
[2024-06-24 21:40:12.106] [toolkit] [info ] Toolkit reported # displays : 1
Gdk-Message: 21:40:12.117: Error 71 (Protocol error) dispatching to Wayland display.

I get the same "Error 71" when running from Sway. It looks like Workrave terminates rather than segfaulting, so I can't get a backtrace from GDB.

jjramsey commented 5 months ago

These are the messages that I get when running Workrave with WAYLAND_DEBUG set to 1: workrave-msgs-on-labwc2.txt

jjramsey commented 5 months ago

I tried Workrave on Hyprland because although it technically is based on wlroots as well, it's based on its own fork of it. Interestingly enough, Workrave does seem to work fine on Hyprland.

Not sure if this is a bug in Workrave being smoked out by wlroots, or a bug in wlroots being smoked out by Workrave.

jjramsey commented 5 months ago

The problem is not yet fixed, even with the latest pull request. Here's what I get when running Workrave with WAYLAND_DEBUG=1: workrave-msgs-on-labwc3.txt

The debug output is different; there is a zwlr_layer_surface_v1#39.destroy() there. Looks like something else is getting destroyed prematurely.