wvkbd v0.14 and later crash on key press under Wayfire 0.7.4
I was running the latest packaged version of wvkbd (v0.12) provided by which seemed to be working fine under latest available Wayfire (0.7.4) (Debian Bookworm on ARM64). However, I wanted to make some custom keyboard layouts so decided to modify and recompile from source.
I checked out the 0.14.3 tag and everything builds and installs successfully but I get the following 'client communication' error in Wayfire debug log when I press a key. I reverted all my changes and recompiled vanilla from the tag. Same issue. Tags v0.14, v0.14.1, v0.14.2 yield the same result but v0.12 and v0.13 are working fine.
Could this be a bug in wvkbd or is this more likely to be an issue running under wayfire?
DD 05-11-23 23:28:15.200 - [src/core/seat/pointer.cpp:120] change cursor focus 0xaaaaecb10dc8 -> 0xaaaaecb13728
DD 05-11-23 23:28:16.800 - [src/core/seat/pointer.cpp:120] change cursor focus 0xaaaaecb13728 -> 0xaaaaecb10dc8
DD 05-11-23 23:28:17.455 - [src/core/seat/pointer.cpp:120] change cursor focus 0xaaaaecb10dc8 -> 0xaaaaecb13728
DD 05-11-23 23:28:20.734 - [src/core/seat/pointer.cpp:120] change cursor focus 0xaaaaecb13728 -> 0xaaaaecb10dc8
DD 05-11-23 23:28:21.232 - [src/core/seat/pointer.cpp:120] change cursor focus 0xaaaaecb10dc8 -> 0xaaaaecb13728
II 05-11-23 23:28:21.864 - [wayland] error in client communication (pid 12786)
II 05-11-23 23:28:21.864 - [src/core/seat/input-manager.cpp:94] remove input: virtual keyboard
DD 05-11-23 23:28:21.864 - [src/core/seat/pointer.cpp:120] change cursor focus 0xaaaaecb13728 -> (null)
DD 05-11-23 23:28:21.864 - [src/core/core.cpp:595] focusing layer 0
I tried wvkbd v0.14.3 on wayfire 0.8.0 and there it crashes immediately even:
Initializing keyboard
Found 54 layouts
Found 2 layers
Resize 2160x250 1.000000, 55 layouts
listener function for opcode 1 of wl_surface is NULL
[1] 8005 IOT instruction (core dumped) ./wvkbd-mobintl
gdb trace:
#0 __pthread_kill_implementation
(threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff78858a3 in __pthread_kill_internal (signo=6, threadid=<optimized out>)
at pthread_kill.c:78
#2 0x00007ffff7835668 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff781d4b8 in __GI_abort () at abort.c:79
#4 0x00007ffff7f864f2 in wl_abort
(fmt=fmt@entry=0x7ffff7f8b338 "listener function for opcode %u of %s is NULL\n")
at ../wayland-1.22.0/src/wayland-util.c:462
#5 0x00007ffff7f86700 in wl_closure_invoke
(closure=closure@entry=0x5555556c81d0, target=<optimized out>,
target@entry=0x55555562dfc0, opcode=opcode@entry=1, data=<optimized out>, flags=1)
at ../wayland-1.22.0/src/connection.c:1022
#6 0x00007ffff7f86e73 in dispatch_event
(display=display@entry=0x5555556289d0, queue=0x555555628ac0)
at ../wayland-1.22.0/src/wayland-client.c:1631
#7 0x00007ffff7f8713c in dispatch_queue (queue=0x555555628ac0, display=0x5555556289d0)
at ../wayland-1.22.0/src/wayland-client.c:1777
#8 wl_display_dispatch_queue_pending (display=0x5555556289d0, queue=0x555555628ac0)
at ../wayland-1.22.0/src/wayland-client.c:2019
#9 0x0000555555580ef1 in main (argc=1, argv=0x7fffffffd7c8) at main.c:1018
You said that v0.12 works fine, I wonder if the culprit is the fractional scaling support we added in v0.14 and whether that's implemented in wayfire (I also noticed a warning about that when launching 'foot').
This will need some deeper investigation.
I implemented a fix for the issue I encountered above, after which wvkbd runs fine on the latest wayfire 0.8.0 .
However, this might not fix the original issue on wayfire 0.7.4. Could you give it a try?
Brilliant, great news - glad to hear you managed to get it working under the latest Wayfire.
However, I just tried a quick recompile on Wayfire v0.7.4 and I'm getting the same issue. I'm trying to use the default distro versions of Wayfire as that's what most people will be using.
When I get a second I might also try running under Wayfire v0.7.5 which is what ships by default with the latest Raspberry Pi OS (and is the ultimate destination for my compiled binary).
(I'm compiling and testing under vanilla Debian Bookworm ARM64 (which uses Wayfire 0.7.4) under UTM on MacOS to speed up compile/test times).
Did you have more luck on v0.7.5? I hope RaspiOS switches to 0.8.0 soon then this issue would be solved.
I released wvkbd v0.14.4 that should address this for at least wayfire 0.8.0
Unfortunately not yet. I've held back on the version of wvkbd I'm using until Raspberry Pi OS switches to Wayfire v0.8.0. Like you say, fingers crossed this will be soon.