hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
305 stars 48 forks source link

Portal crashes after trying to screenshare with `xwaylandvideobridge` #119

Closed samchouse closed 11 months ago

samchouse commented 1 year ago

It was working fine a while ago, now it crashes every time I try to screenshare.

Hyprland w/ NVIDIA patch

Hyprland, built from branch main at commit 24c04a8b7c874ead168bb2418f4325cb8bdaca5b dirty (crashreporter: avoid using empty CACHE_HOME).
Tag: v0.30.0-60-g24c04a8b

flags: (if any)

v0.5.0

Oct 22 09:15:23 arch systemd[1256]: Starting Portal service (Hyprland implementation)...
Oct 22 09:15:23 arch systemd[1256]: Started Portal service (Hyprland implementation).
Oct 22 09:16:07 arch xdg-desktop-portal-hyprland[1468]: 2023/10/22 09:16:07 [ERROR] - xdg-desktop-portal-hyprland: unsupported wl_shm format 0x34324742
Oct 22 09:16:07 arch systemd-coredump[6503]: [🡕] Process 1468 (xdg-desktop-por) of user 1000 dumped core.

                                             Stack trace of thread 1468:
                                             #0  0x00007fac3b87a83c n/a (libc.so.6 + 0x8e83c)
                                             #1  0x00007fac3b82a668 raise (libc.so.6 + 0x3e668)
                                             #2  0x00007fac3b8124b8 abort (libc.so.6 + 0x264b8)
                                             #3  0x0000564cc533caaf n/a (xdg-desktop-portal-hyprland + 0xdaaf)
                                             #4  0x0000564cc5341659 n/a (xdg-desktop-portal-hyprland + 0x12659)
                                             #5  0x00007fac3b7e84f6 n/a (libffi.so.8 + 0x74f6)
                                             #6  0x00007fac3b7e4f5e n/a (libffi.so.8 + 0x3f5e)
                                             #7  0x00007fac3b7e7b73 ffi_call (libffi.so.8 + 0x6b73)
                                             #8  0x00007fac3bbe2645 n/a (libwayland-client.so.0 + 0x7645)
                                             #9  0x00007fac3bbe2e73 n/a (libwayland-client.so.0 + 0x7e73)
                                             #10 0x00007fac3bbe313c wl_display_dispatch_queue_pending (libwayland-client.so.0 + 0x813c)
                                             #11 0x0000564cc5341e00 n/a (xdg-desktop-portal-hyprland + 0x12e00)
                                             #12 0x00007fac3bb1e42d n/a (libsystemd.so.0 + 0x3642d)
                                             #13 0x00007fac3bb37dec n/a (libsystemd.so.0 + 0x4fdec)
                                             #14 0x0000564cc5335cde n/a (xdg-desktop-portal-hyprland + 0x6cde)
                                             #15 0x00007fac3b813cd0 n/a (libc.so.6 + 0x27cd0)
                                             #16 0x00007fac3b813d8a __libc_start_main (libc.so.6 + 0x27d8a)
                                             #17 0x0000564cc53362e5 n/a (xdg-desktop-portal-hyprland + 0x72e5)

                                             Stack trace of thread 1470:
                                             #0  0x00007fac3b8fcbf6 epoll_wait (libc.so.6 + 0x110bf6)
                                             #1  0x00007fac3bc08859 n/a (libspa-support.so + 0x16859)
                                             #2  0x00007fac3bbfa58d n/a (libspa-support.so + 0x858d)
                                             #3  0x00007fac3ba4ad82 n/a (libpipewire-0.3.so.0 + 0x45d82)
                                             #4  0x00007fac3b8789eb n/a (libc.so.6 + 0x8c9eb)
                                             #5  0x00007fac3b8fc7cc n/a (libc.so.6 + 0x1107cc)
                                             ELF object binary architecture: AMD x86-64
Oct 22 09:16:07 arch systemd[1256]: xdg-desktop-portal-hyprland.service: Main process exited, code=dumped, status=6/ABRT
Oct 22 09:16:07 arch systemd[1256]: xdg-desktop-portal-hyprland.service: Failed with result 'core-dump'.
Oct 22 09:16:07 arch systemd[1256]: xdg-desktop-portal-hyprland.service: Scheduled restart job, restart counter is at 1.
Oct 22 09:16:07 arch systemd[1256]: Starting Portal service (Hyprland implementation)...
Oct 22 09:16:07 arch systemd[1256]: Started Portal service (Hyprland implementation).

v1.2.2

Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy]  | appid:
Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy] SelectSources:
Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_50/xwaylandvideobridge556977073
Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/session/1_50/xwaylandvideobridge556977073
Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy]  | appid:
Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy] option cursor_mode to 2
Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy] unused option multiple
Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy] unused option types
Oct 22 09:06:09 arch xdg-desktop-portal-hyprland[1485]: [LOG] [screencopy] restore data invalid / missing, prompting
Oct 22 09:06:11 arch systemd-coredump[6767]: [🡕] Process 1485 (xdg-desktop-por) of user 1000 dumped core.

                                             Stack trace of thread 1485:
                                             #0  0x00007ff12e1bf83c n/a (libc.so.6 + 0x8e83c)
                                             #1  0x00007ff12e16f668 raise (libc.so.6 + 0x3e668)
                                             #2  0x00007ff12e1574b8 abort (libc.so.6 + 0x264b8)
                                             #3  0x000055f0d8925bbd n/a (xdg-desktop-portal-hyprland + 0x30bbd)
                                             #4  0x000055f0d890ede0 n/a (xdg-desktop-portal-hyprland + 0x19de0)
                                             #5  0x00007ff12dfe74f6 n/a (libffi.so.8 + 0x74f6)
                                             #6  0x00007ff12dfe3f5e n/a (libffi.so.8 + 0x3f5e)
                                             #7  0x00007ff12dfe6b73 ffi_call (libffi.so.8 + 0x6b73)
                                             #8  0x00007ff12e6ae645 n/a (libwayland-client.so.0 + 0x7645)
                                             #9  0x00007ff12e6aee73 n/a (libwayland-client.so.0 + 0x7e73)
                                             #10 0x00007ff12e6af13c wl_display_dispatch_queue_pending (libwayland-client.so.0 + 0x813c)
                                             #11 0x000055f0d891faea n/a (xdg-desktop-portal-hyprland + 0x2aaea)
                                             #12 0x000055f0d8921f23 n/a (xdg-desktop-portal-hyprland + 0x2cf23)
                                             #13 0x00007ff12e6e0a20 _ZN5sdbus8internal6Object21sdbus_method_callbackEP14sd_bus_messagePvP12sd_bus_error (libsdbus-c++.so.1 + 0x27a20)
                                             #14 0x00007ff12e02142d n/a (libsystemd.so.0 + 0x3642d)
                                             #15 0x00007ff12e03adec n/a (libsystemd.so.0 + 0x4fdec)
                                             #16 0x00007ff12e6d5588 _ZN5sdbus8internal10Connection21processPendingRequestEv (libsdbus-c++.so.1 + 0x1c588)
                                             #17 0x000055f0d8900f0d n/a (xdg-desktop-portal-hyprland + 0xbf0d)
                                             #18 0x00007ff12e158cd0 n/a (libc.so.6 + 0x27cd0)
                                             #19 0x00007ff12e158d8a __libc_start_main (libc.so.6 + 0x27d8a)
                                             #20 0x000055f0d8901ee5 n/a (xdg-desktop-portal-hyprland + 0xcee5)

                                             Stack trace of thread 1490:
                                             #0  0x00007ff12e1ba700 n/a (libc.so.6 + 0x89700)
                                             #1  0x00007ff12e1c0ec2 pthread_mutex_lock (libc.so.6 + 0x8fec2)
                                             #2  0x000055f0d890e731 n/a (xdg-desktop-portal-hyprland + 0x19731)
                                             #3  0x00007ff12e4e1943 execute_native_thread_routine (libstdc++.so.6 + 0xe1943)
                                             #4  0x00007ff12e1bd9eb n/a (libc.so.6 + 0x8c9eb)
                                             #5  0x00007ff12e2417cc n/a (libc.so.6 + 0x1107cc)

                                             Stack trace of thread 1487:
                                             #0  0x00007ff12e241bf6 epoll_wait (libc.so.6 + 0x110bf6)
                                             #1  0x00007ff12e81f859 n/a (libspa-support.so + 0x16859)
                                             #2  0x00007ff12e81158d n/a (libspa-support.so + 0x858d)
                                             #3  0x00007ff12e73fd82 n/a (libpipewire-0.3.so.0 + 0x45d82)
                                             #4  0x00007ff12e1bd9eb n/a (libc.so.6 + 0x8c9eb)
                                             #5  0x00007ff12e2417cc n/a (libc.so.6 + 0x1107cc)

                                             Stack trace of thread 1491:
                                             #0  0x00007ff12e1ba4ae n/a (libc.so.6 + 0x894ae)
                                             #1  0x00007ff12e1bd325 pthread_cond_clockwait (libc.so.6 + 0x8c325)
                                             #2  0x000055f0d890dfe2 n/a (xdg-desktop-portal-hyprland + 0x18fe2)
                                             #3  0x00007ff12e4e1943 execute_native_thread_routine (libstdc++.so.6 + 0xe1943)
                                             #4  0x00007ff12e1bd9eb n/a (libc.so.6 + 0x8c9eb)
                                             #5  0x00007ff12e2417cc n/a (libc.so.6 + 0x1107cc)
                                             ELF object binary architecture: AMD x86-64
Oct 22 09:06:11 arch xdg-desktop-portal-hyprland[1485]: [LOG] execAndGet: WAYLAND_DISPLAY=wayland-1 QT_QPA_PLATFORM="wayland" XCURSOR_SIZE=24 HYPRLAND_INSTANCE_SIGNATURE=24c04a8b7c874ead168bb2418f432
Oct 22 09:06:11 arch systemd[1273]: xdg-desktop-portal-hyprland.service: Main process exited, code=dumped, status=6/ABRT
Oct 22 09:06:11 arch systemd[1273]: xdg-desktop-portal-hyprland.service: Failed with result 'core-dump'.
Oct 22 09:06:12 arch systemd[1273]: xdg-desktop-portal-hyprland.service: Scheduled restart job, restart counter is at 1.
Oct 22 09:06:12 arch systemd[1273]: Starting Portal service (Hyprland implementation)...
Oct 22 09:06:12 arch systemd[1273]: Started Portal service (Hyprland implementation).
vaxerski commented 1 year ago

I need a debug stack trace

samchouse commented 1 year ago

How do I take one?

Edit: nvm I think I got it

Oct 22 09:49:48 arch systemd-coredump[34523]: Process 33412 (xdg-desktop-por) of user 1000 dumped core.

                                              Stack trace of thread 33412:
                                              #0  0x00007fc3472ac83c n/a (libc.so.6 + 0x8e83c)
                                              #1  0x00007fc34725c668 raise (libc.so.6 + 0x3e668)
                                              #2  0x00007fc3472444b8 abort (libc.so.6 + 0x264b8)
                                              #3  0x000055be228ca165 _Z16drmFourccFromSHM13wl_shm_format (xdg-desktop-portal-hyprland + 0x63165)
                                              #4  0x000055be228ab58b wlrOnBuffer (xdg-desktop-portal-hyprland + 0x4458b)
                                              #5  0x00007fc3476eb4f6 n/a (libffi.so.8 + 0x74f6)
                                              #6  0x00007fc3476e7f5e n/a (libffi.so.8 + 0x3f5e)
                                              #7  0x00007fc3476eab73 ffi_call (libffi.so.8 + 0x6b73)
                                              #8  0x00007fc347977645 n/a (libwayland-client.so.0 + 0x7645)
                                              #9  0x00007fc347977e73 n/a (libwayland-client.so.0 + 0x7e73)
                                              #10 0x00007fc34797813c wl_display_dispatch_queue_pending (libwayland-client.so.0 + 0x813c)
                                              #11 0x000055be228b0825 _ZN17CScreencopyPortal12startSharingEPNS_8SSessionE (xdg-desktop-portal-hyprland + 0x49825)
                                              #12 0x000055be228af774 _ZN17CScreencopyPortal7onStartERN5sdbus10MethodCallE (xdg-desktop-portal-hyprland + 0x48774)
                                              #13 0x000055be228b14d0 _ZZN17CScreencopyPortalC4EP26zwlr_screencopy_manager_v1ENKUlN5sdbus10MethodCallEE1_clES3_ (xdg-desktop-portal-hyprland + 0x4a4d0)
                                              #14 0x000055be228b98cc __invoke_impl<void, CScreencopyPortal::CScreencopyPortal(zwlr_screencopy_manager_v1*)::<lambda(sdbus::MethodCall)>&, sdbus::MethodCall> (xdg-desktop-portal-hyprland + 0x528cc)
                                              #15 0x000055be228b8ba9 __invoke_r<void, CScreencopyPortal::CScreencopyPortal(zwlr_screencopy_manager_v1*)::<lambda(sdbus::MethodCall)>&, sdbus::MethodCall> (xdg-desktop-portal-hyprland + 0x51ba9)
                                              #16 0x000055be228b7e30 _M_invoke (xdg-desktop-portal-hyprland + 0x50e30)
                                              #17 0x000055be228ed599 _ZNKSt8functionIFvN5sdbus10MethodCallEEEclES1_ (xdg-desktop-portal-hyprland + 0x86599)
                                              #18 0x000055be228ead8c _ZN5sdbus8internal6Object21sdbus_method_callbackEP14sd_bus_messagePvP12sd_bus_error (xdg-desktop-portal-hyprland + 0x83d8c)
                                              #19 0x00007fc3479b842d n/a (libsystemd.so.0 + 0x3642d)
                                              #20 0x00007fc3479d1dec n/a (libsystemd.so.0 + 0x4fdec)
                                              #21 0x000055be228f680e _ZN5sdbus8internal5SdBus14sd_bus_processEP6sd_busPP14sd_bus_message (xdg-desktop-portal-hyprland + 0x8f80e)
                                              #22 0x000055be228d4a38 _ZN5sdbus8internal10Connection21processPendingRequestEv (xdg-desktop-portal-hyprland + 0x6da38)
                                              #23 0x000055be2287694f _ZN14CPortalManager14startEventLoopEv (xdg-desktop-portal-hyprland + 0xf94f)
                                              #24 0x000055be22875cb8 _ZN14CPortalManager4initEv (xdg-desktop-portal-hyprland + 0xecb8)
                                              #25 0x000055be228994c6 main (xdg-desktop-portal-hyprland + 0x324c6)
                                              #26 0x00007fc347245cd0 n/a (libc.so.6 + 0x27cd0)
                                              #27 0x00007fc347245d8a __libc_start_main (libc.so.6 + 0x27d8a)
                                              #28 0x000055be22874035 _start (xdg-desktop-portal-hyprland + 0xd035)

                                              Stack trace of thread 33430:
                                              #0  0x00007fc3472a74ae n/a (libc.so.6 + 0x894ae)
                                              #1  0x00007fc3472aa325 pthread_cond_clockwait (libc.so.6 + 0x8c325)
                                              #2  0x000055be2287931b _ZNSt9__condvar10wait_untilERSt5mutexiR8timespec (xdg-desktop-portal-hyprland + 0x1231b)
                                              #3  0x000055be22888de0 _ZNSt18condition_variable17__wait_until_implINSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEEESt9cv_statusRSt11unique_lockISt5mutexERKNS1_10time_pointINS1_3_V212steady_clockET_EE (xdg-desktop-portal-hyprland + 0x21de0)
                                              #4  0x000055be2288709b _ZNSt18condition_variable10wait_untilINSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEEESt9cv_statusRSt11unique_lockISt5mutexERKNS1_10time_pointINS1_3_V212steady_clockET_EE (xdg-desktop-portal-hyprland + 0x2009b)
                                              #5  0x000055be22877bc5 wait_until<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> >, CPortalManager::startEventLoop()::<lambda()>::<lambda()> > (xdg-desktop-portal-hyprland + 0x10bc5)
                                              #6  0x000055be2287773c wait_for<long int, std::ratio<1, 1000>, CPortalManager::startEventLoop()::<lambda()>::<lambda()> > (xdg-desktop-portal-hyprland + 0x1073c)
                                              #7  0x000055be22876449 _ZZN14CPortalManager14startEventLoopEvENKUlvE0_clEv (xdg-desktop-portal-hyprland + 0xf449)
                                              #8  0x000055be22878de9 __invoke_impl<void, CPortalManager::startEventLoop()::<lambda()> > (xdg-desktop-portal-hyprland + 0x11de9)
                                              #9  0x000055be22878d59 __invoke<CPortalManager::startEventLoop()::<lambda()> > (xdg-desktop-portal-hyprland + 0x11d59)
                                              #10 0x000055be22878cda _M_invoke<0> (xdg-desktop-portal-hyprland + 0x11cda)
                                              #11 0x000055be22878c92 operator() (xdg-desktop-portal-hyprland + 0x11c92)
                                              #12 0x000055be22878c56 _M_run (xdg-desktop-portal-hyprland + 0x11c56)
                                              #13 0x00007fc3474e1943 execute_native_thread_routine (libstdc++.so.6 + 0xe1943)
                                              #14 0x00007fc3472aa9eb n/a (libc.so.6 + 0x8c9eb)
                                              #15 0x00007fc34732e7cc n/a (libc.so.6 + 0x1107cc)

                                              Stack trace of thread 33429:
                                              #0  0x00007fc3472a7700 n/a (libc.so.6 + 0x89700)
                                              #1  0x00007fc3472adec2 pthread_mutex_lock (libc.so.6 + 0x8fec2)
                                              #2  0x000055be228791f9 __gthread_mutex_lock (xdg-desktop-portal-hyprland + 0x121f9)
                                              #3  0x000055be228792a2 _ZNSt5mutex4lockEv (xdg-desktop-portal-hyprland + 0x122a2)
                                              #4  0x000055be2287ca20 _ZNSt10lock_guardISt5mutexEC2ERS0_ (xdg-desktop-portal-hyprland + 0x15a20)
                                              #5  0x000055be2287617a _ZZN14CPortalManager14startEventLoopEvENKUlvE_clEv (xdg-desktop-portal-hyprland + 0xf17a)
                                              #6  0x000055be22878e26 __invoke_impl<void, CPortalManager::startEventLoop()::<lambda()> > (xdg-desktop-portal-hyprland + 0x11e26)
                                              #7  0x000055be22878dac __invoke<CPortalManager::startEventLoop()::<lambda()> > (xdg-desktop-portal-hyprland + 0x11dac)
                                              #8  0x000055be22878d06 _M_invoke<0> (xdg-desktop-portal-hyprland + 0x11d06)
                                              #9  0x000055be22878cae operator() (xdg-desktop-portal-hyprland + 0x11cae)
                                              #10 0x000055be22878c76 _M_run (xdg-desktop-portal-hyprland + 0x11c76)
                                              #11 0x00007fc3474e1943 execute_native_thread_routine (libstdc++.so.6 + 0xe1943)
                                              #12 0x00007fc3472aa9eb n/a (libc.so.6 + 0x8c9eb)
                                              #13 0x00007fc34732e7cc n/a (libc.so.6 + 0x1107cc)

                                              Stack trace of thread 33428:
                                              #0  0x00007fc34732ebf6 epoll_wait (libc.so.6 + 0x110bf6)
                                              #1  0x00007fc347a90859 n/a (libspa-support.so + 0x16859)
                                              #2  0x00007fc347a8258d n/a (libspa-support.so + 0x858d)
                                              #3  0x00007fc3478d2d82 n/a (libpipewire-0.3.so.0 + 0x45d82)
                                              #4  0x00007fc3472aa9eb n/a (libc.so.6 + 0x8c9eb)
                                              #5  0x00007fc34732e7cc n/a (libc.so.6 + 0x1107cc)
                                              ELF object binary architecture: AMD x86-64
vaxerski commented 1 year ago

xwaylandvideobridge asks for a weird format that xdph doesn't support. That's it

samchouse commented 1 year ago

Just checked xwaylandvideobridge's commits and it doesn't seem like anything much has changed, apart from choosing the right cursor so I'm not sure how that's possible since xwaylandvideobridge was working fine about a month ago. I reverted to an older xwaylandvideobridge commit and it still doesn't work with either that one anymore. Could it be a driver issue instead?

vaxerski commented 1 year ago

could be

Morantoine commented 1 year ago

Same issue here

samchouse commented 11 months ago

Issue ended up being that cage required wlroots so the wrong wlroots was being used. Uninstalling fixed the issue.