Created attachment 151780 [details] GDB backtrace SUMMARY I've trying to start `krfb-virtualmonitor` in Plasma Wayland session with this command: ``` krfb-virtualmonitor --name wireless --password 123 --resolution 1280x720 --port 5900 ``` Every time it crashes with SIGSEGV (Address boundary error). SOFTWARE/OS VERSIONS Operating System: Fedora Linux 36 KDE Plasma Version: 5.25.4 KDE Frameworks Version: 5.97.0 Qt Version: 5.15.5 Kernel Version: 5.19.4-200.fc36.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor Memory: 31.2 ГиБ of RAM Graphics Processor: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 Manufacturer: ASUS
Additional output from gdb: ``` (gdb) frame 1 #1 0x00007fffe1b141ff in KrfbXCBEventFilter::KrfbXCBEventFilter (owner=0x5555556b1ed0, this=0x5555556b1fc0) at /usr/src/debug/krfb-22.08.0-2.fc36.x86_64/framebuffers/xcb/xcb_framebuffer.cpp:52 52 const xcb_query_extension_reply_t *xdamage_data = xcb_get_extension_data( (gdb) list 47 KrfbXCBEventFilter::KrfbXCBEventFilter(XCBFrameBuffer *owner): 48 xdamageBaseEvent(0), xdamageBaseError(0), 49 xshmBaseEvent(0), xshmBaseError(0), xshmAvail(false), 50 fb_owner(owner) 51 { 52 const xcb_query_extension_reply_t *xdamage_data = xcb_get_extension_data( 53 QX11Info::connection(), &xcb_damage_id); 54 if (xdamage_data) { 55 // also query extension version! 56 // ATTENTION: if we don't do that, xcb_damage_create() will always FAIL! (gdb) p QX11Info::connection() $1 = (xcb_connection_t *) 0x0 ``` Why QX11Info::connection() is called in Wayland session, is it OK?
Output from `QT_LOGGING_RULES="krfb.krfb=true" krfb-virtualmonitor --name wireless --password 123 --resolution 1280x720 --port 5900`: ``` krfb.krfb: Loaded plugin with name "pw" krfb.krfb: Loaded plugin with name "qt" krfb.krfb: Loaded plugin with name "xcb" krfb.krfb: Using FrameBuffer: "xcb" fish: Job 1, 'QT_LOGGING_RULES="krfb.krfb=tru…' terminated by signal SIGSEGV (Address boundary error ```
TLDR: Default framebuffer plugin was set to xcb, if krfb-virtualmonitor uses it under Wayland - it will crash. Crash could be simply reproduced with: `rm -f ~/.config/krfbrc && krfb-virtualmonitor --name wireless --password 123 --resolution 2340x1080 --port 5900`.
Confirm issue. krfb 22.11.90 OS: Kubuntu 22.10 KDE Plasma: 5.25.5 KDE Frameworks: 5.98.0 Qt: 5.15.6 Kernel version: 5.19.0-23-generic (64-бита) Graphics Platform: Wayland CPU: 12 × AMD Ryzen 5 5500U with Radeon Graphics RAM: 30,7 ГиБ ОЗУ Manufacturer: HP
Looks like this bug is gone. It's still crashing after connect but with different stack trace.
Created attachment 164989 [details] Archlinux - GDB output from jiriks74
I've encountered this bug when I tried to use the KDE Connect's Virtual Display feature. I've ran `krfb` in GDB to see what causes the problem but I'm no smarter from the output. The GDB output is in attachments: https://bugs.kde.org/attachment.cgi?id=164989 The line that it gets SIGSEGV on is this one: #0 __memcpy_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:660 I've tried changing the framebuffer module from `pw` to `qt` (as in settings it said that it's a slower fallback module but more stable) but then I saw that it doesn't work on Wayland in the output on `krfb` startup. OS Info: Operating System: EndeavourOS (Arch Linux) KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.114.0 Qt Version: 5.15.12 Kernel Version: 6.7.0-zen3-1-zen (64-bit) Graphics Platform: Wayland Processors: 20 × 12th Gen Intel® Core™ i7-12700H Memory: 15,3 GiB of RAM Graphics Processor: Mesa Intel® Graphics
Can you retest this issue? There's been changes and as of 6.0.3 I can no longer cause krfb-virtualmonitor to crash nor can I use it to crash plasmashell.
Changing status to be more appropriate
Can't reproduce anymore with krfb-virtualmonitor version 24.02.1, Fedora 40.
I just tested this on NixOS `krfb-virtualmonitor` doesn't crash (I didn't check if it works) but `kfrb` does. krfb-virtualmonitor was ran as `krfb-virtualmonitor --name wireless --password 123 --resolution 1920x1200 --port 5900` When running `krfb 23.08.5` as `kfrb` I get: > Wayland: Detected invalid configuration: preferredFrameBufferPlugin is not pipewire: "xcb" > Initializing D-Bus connectivity with XDG Desktop Portal > DBus session created: "/org/freedesktop/portal/desktop/request/1_143/krfb2891703386" > kpipewire_dmabuf_logging: eglChooseConfig returned this many configs: 1 > Segmentation fault (core dumped)
Try to reset (delete) krfb config & try again.
(In reply to Yaroslav Sidlovsky from comment #12) > Try to reset (delete) krfb config & try again. Tried that already.