any1 / wayvnc

A VNC server for wlroots based Wayland compositors
ISC License
1.06k stars 65 forks source link

Wayvnc crashes with "write from clipboard incomplete" #254

Open mms-neuro opened 1 year ago

mms-neuro commented 1 year ago

Problem

When connecting to a wayvnc-session (via ssh-tunnel on localhost) on sway, the screen is shortly shown on the viewer before wayvnc closes with the error ERROR: ../src/data-control.c: 202: write from clipboard incomplete

Version:

wayvnc: 0.6.0
neatvnc: 0.6.0
aml: 0.3.0

Trace-Log

$ wayvnc -Ltrace 127.0.0.1 5900 | tee wayvnc-crash.log
Info: Capturing output DP-1
Info: >> Eizo Nanao Corporation EV2785 0x0000F6E0 (DP-1) 3840x2160+0x0 Power:ON
DEBUG: ../src/server.c: 1167: Trying address: 127.0.0.1
DEBUG: ../src/server.c: 1182: Successfully bound to address
Info: Listening for connections on 127.0.0.1:5900
DEBUG: ../src/ctl-server.c: 724: Initializing wayvncctl socket: /run/user/1000/wayvncctl
Info: New client connection from localhost: 0x5556569d12d0 (ref 1)
Info: Starting screen capture
DEBUG: ../src/main.c: 1069: Client connected, new client count: 1
DEBUG: ../src/ctl-server.c: 849: Enqueueing client-connected event: {"id":"1","hostname":"localhost","username":null,"connection_count":1}
DEBUG: ../src/ctl-server.c: 876: Enqueued client-connected event for 0 clients
Info: Choosing tight encoding for client 0x5556569d12d0
ERROR: ../src/data-control.c: 202: write from clipboard incomplete

Stack trace

$ coredumpctl gdb wayvnc
No match found.

Reproducibility

any1 commented 1 year ago

Partial writes and errors need to be handled better here: https://github.com/any1/wayvnc/blame/master/src/data-control.c#L199

Have you tried making sure that your clipboard is empty when you connect?

mms-neuro commented 1 year ago

Yes - I cleared the clipboard with xsel -bc and checked that it is indeed empty.

any1 commented 10 months ago

Is this still an issue with the newest release?

Was there anything more after the last error? Could it be that you don't have core dumps enabled on your system?

qdii commented 8 months ago
$ wayvnc -f 60 192.168.2.31
Warning: ../wayvnc/src/ctl-server.c: 733: Deleting stale control socket path "/tmp/wayvncctl"
ERROR: ../wayvnc/src/data-control.c: 202: write from clipboard incomplete
$ wayvnc --version
wayvnc: v0.7.2-0-g4de85ac (makepkg)
neatvnc: v0.7.1-0-gb5b330b (makepkg)
aml: v0.3.0-0-gb83f357 (makepkg)
Opposite34 commented 4 hours ago

I had this problem as well... but only on Hyprland... (installed sway to sanity check myself and it worked there ). I don't think wayvnc directly supports Hyprland anyway as they're moving away from wlroots, but I'm not sure if this should be reported to the Hyprland side either because I doubt they're trying to support wayvnc(?) I'm not sure though.

Regarding debugging this, I'm not sure how to continue forward with it as mine also didn't have a coredump (despite everything else having one), no journalctl either.

any1 commented 3 hours ago

I don't think wayvnc directly supports Hyprland

WayVNC doesn't directly support any particular compositor. If the compositor (correctly) implements the required protocols, it is supported.