milgra / sov

An overlay that shows schemas for all workspaces to make navigation in sway easier.
GNU General Public License v3.0
311 stars 14 forks source link

SOV glitch starting from swayconfig #18

Open simoneruffini opened 2 years ago

simoneruffini commented 2 years ago

Using a similar method to bind the show/hiding and the start of sov as described in the README i get the following undesired behaviour: sov glitches and remains showed as if the pipe gets repeatedly filled with 1s an 0s, in the journal I can see a lot of:

Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.313939 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.327357 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.335062 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.343886 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.351279 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.360054 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.367750 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.376243 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.383652 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.392089 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.399383 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.407826 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.416950 INFO ../src/sov/main.c:554: Showing on output eDP-1
Jun 24 14:48:41 DELL-XPS-9570 sway[21260]: 1656074921.426389 INFO ../src/sov/main.c:554: Showing on output eDP-1

Untill at some point the program crasshes with the following output:

Jun 24 14:43:35 DELL-XPS-9570 sway[1559]: 00:49:16.010 [INFO] [wlr] [wayland] error in client communication (pid 18737)
Jun 24 14:43:38 DELL-XPS-9570 sway[18737]: Error sending request: Broken pipe
Jun 24 14:43:38 DELL-XPS-9570 sway[18737]: 1656074618.976666 ERROR ../src/sov/main.c:550: wl_display_roundtrip failed
Jun 24 14:43:38 DELL-XPS-9570 kernel: show_signal_msg: 63 callbacks suppressed
Jun 24 14:43:38 DELL-XPS-9570 kernel: sov[18737]: segfault at 10 ip 00007fbda6e6727a sp 00007ffd4b87b500 error 4 in libwayland-client.so.0.20.0[7fbda6e66000+6000]
Jun 24 14:43:38 DELL-XPS-9570 kernel: Code: 8b 55 00 4c 8d 7c 24 20 48 8d 4c 24 08 48 8d 84 24 c0 01 00 00 c7 44 24 08 28 00 00 00 48 89 44 24 10 48 8d 84 24 d0 00 00 00 <48> 8b 72 10 ba 14 00 00 00 48 89 44 24 18 44 89 e0 48 8d 04 40 c7
Jun 24 14:43:38 DELL-XPS-9570 systemd[1]: Created slice Slice /system/systemd-coredump.
Jun 24 14:43:38 DELL-XPS-9570 systemd[1]: Started Process Core Dump (PID 19527/UID 0).
                                                       ELF object binary architecture: AMD x86-64
                                                       #7  0x0000000000403cd1 _start (sov + 0x3cd1)
                                                       #6  0x00007fbda6aea2f5 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x292f5)
                                                       #5  0x00007fbda6aea237 __libc_start_call_main (libc.so.6 + 0x29237)
                                                       #4  0x00000000004039fc main (sov + 0x39fc)
                                                       #3  0x000000000040db55 sov_destroy (sov + 0xdb55)
                                                       #2  0x000000000040cf63 sov_output_destroy (sov + 0xcf63)
                                                       #1  0x000000000040cf02 sov_surface_destroy (sov + 0xcf02)
                                                       #0  0x00007fbda6e6727a wl_proxy_marshal_flags (libwayland-client.so.0 + 0x727a)
                                                       Stack trace of thread 18737:
                                                       Module sov without build-id.
                                                       Module libwayland-client.so.0 with build-id 4fef743edf9c2b855a7dd35711bc9826f5a2375e
                                                       Module libfreetype.so.6 without build-id.
                                                       Module libm.so.6 with build-id 1a2e2d6f7d6ffb7928167842f22cd9530c5a977b
                                                       Module libc.so.6 with build-id c03db892abc48c05e03cffe78611747cc59d2842
                                                       Module libffi.so.8 without build-id.
                                                       Module libbz2.so.1 without build-id.
                                                       Module libpng16.so.16 without build-id.
                                                       Module libz.so.1 without build-id.
                                                       Module libpthread.so.0 with build-id ce291a619265ed432f53f6d68623ffa0f03e6bbf
                                                       Module ld-linux-x86-64.so.2 with build-id 6d56d9fcd67825480fa57abbc3ea66703f536339
                                                       Module linux-vdso.so.1 with build-id 95945c6f4f0a2d417f23f38a4d5cb85d7df2f0ad

Jun 24 14:43:39 DELL-XPS-9570 systemd-coredump[19528]: [🡕] Process 18737 (sov) of user 1000 dumped core.

Instead if I start sov from the terminal this does not happen: the keybinding correctly shows/hides sov.

This is what I put in my sway config (as you can see they are similar to the default in the README) :

bindsym --no-repeat $mod+equal  exec "echo 1 > /tmp/sovpipe"
bindsym --release $mod+equal  exec "echo 0 > /tmp/sovpipe"
exec_always rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov

Versions: sov v0.71 from nixpkgs unstable sway 1.7 from nixpkgs 22.05

milgra commented 2 years ago

Hi, yes, sov is flooding the wayland communication pipe and that causes the crash. The question is why it receives continuous zeros and ones. Does the problem exist after restart? What happens if you just tail /tmp/sovpipe in a terminal? Is there only one sov instance running?

simoneruffini commented 2 years ago

Does the problem exist after restart?

Do you mean the restart of sway? In that case, yes it does persist.

What happens if you just tail /tmp/sovpipe in a terminal?

Nothing appears, the data just gets consumed faster than it can get printed.

Is there only one sov instance running?

Yes

milgra commented 2 years ago

Thanks, I will try it on NixOS with the given versions.

milgra commented 10 months ago

Hi, I've changed the STDIN handling in 0.93, is it still happening?