wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Crash when connecting wacom tablet

Open mfxbe opened this issue 3 years ago • 3 comments

Describe the bug While working on #1414 I noticed that sometimes wayfire will crash when I connect/disconnect my wacom tablet. Happens in stabilize-api as well as in master. Doesn't happen every time but quit often. It seems to me that it happens more often if any kind of window is open but I migh be wrong here.

To Reproduce Steps to reproduce the behavior: (1. Open any kind of window) 2. Connect/Disconnect tablet a couple of times (USB) 3. Wayfire crash

Expected behavior Wayfire doesn't crash and tablet gets recognized.

Screenshots or stacktrace See attached log. testlog.log

Wayfire version git master, git stabilize-api

mfxbe avatar Jan 22 '22 14:01 mfxbe

Quite consistently happens to me too on wayfire 0.7.2

liabri avatar Jan 23 '22 18:01 liabri

The following patch on top of wayfire 0.7.2 fixes this for me:

diff --git a/src/core/seat/tablet.cpp b/src/core/seat/tablet.cpp
index 274a5c75..8fec4fc1 100644
--- a/src/core/seat/tablet.cpp
+++ b/src/core/seat/tablet.cpp
@@ -479,7 +479,7 @@ void wf::tablet_pad_t::update_focus(wlr_surface *focus_surface)
     {
         wlr_tablet_v2_tablet_pad_notify_enter(pad_v2,
             attached_to->tablet_v2, focus_surface);
-    } else
+    } else if(old_focus)
     {
         wlr_tablet_v2_tablet_pad_notify_leave(pad_v2, old_focus);
     }

If there's interest I could submit a PR. I haven't tested for 0.7.3. It doesn't seem to break anything, but I haven't tested thoroughly.

ethan2-0 avatar May 17 '22 00:05 ethan2-0

@ethan2-0 I'd appreciate a PR if you're willing to take the time, I keep running into this on my system.

wloxyz avatar Aug 16 '22 22:08 wloxyz

Looks like its fixed. Thanks to @ethan2-0

mfxbe avatar Oct 29 '22 14:10 mfxbe