hyprwm / xdg-desktop-portal-hyprland

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

File picker core-dumps when trying to select monitor in OBS #82

Closed ItsDrike closed 1 year ago

ItsDrike commented 1 year ago

I'm running xdg-desktop-portal-hyprland-git from AUR, specifically, the version I have is: 1:r261.e1f145d-4, corresponding to git commit: 022469529c8bc95acf222dc5a62389b04c8b1205. Note that I've also had to install sdbus-cpp-git, as it wasn't listed as a dependency in the AUR package. I'm using version 2:1.2.0.4.r317.d20220905.74d849d-1 of that package. Which is actually corresponding to tagged 1.3.0 version in sdbus-cpp project's git repo.

The issue I'm having is that after I add a Screen Capture (Pipewire) source to OBS, clicking on Select Monitor doesn't do anything. In OBS logs, I see:

info: PipeWire initialized
info: [pipewire] Screencast session created
warning: [pipewire] Failed to select source, denied or cancelled by user

Running systemctl --user status xdg-desktop-portal-hyprland, revealed that the portal seems to core dump every time I click this button:

Command output ``` ● xdg-desktop-portal-hyprland.service - Portal service (Hyprland implementation) Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-hyprland.service; static) Active: active (running) since Thu 2023-09-07 12:32:18 CEST; 9min ago Main PID: 19063 (xdg-desktop-por) Tasks: 6 (limit: 18373) Memory: 13.1M CPU: 16.681s CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal-hyprland.service └─19063 /usr/lib/xdg-desktop-portal-hyprland Sep 07 12:32:28 pc xdg-desktop-portal-hyprland[19063]: [LOG] [screencopy] | /org/freedesktop/portal/desktop/session/1_45/obs2 Sep 07 12:32:28 pc hyprland-share-picker[20857]: qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" Sep 07 12:32:28 pc hyprland-share-picker[20857]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. Sep 07 12:32:28 pc systemd-coredump[20861]: [🡕] Process 20857 (hyprland-share-) of user 1000 dumped core. Stack trace of thread 20857: #0 0x00007f0fe008e83c n/a (libc.so.6 + 0x8e83c) #1 0x00007f0fe003e668 raise (libc.so.6 + 0x3e668) #2 0x00007f0fe00264b8 abort (libc.so.6 + 0x264b8) #3 0x00007f0fe08a0098 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0xa0098) #4 0x00007f0fe0f3f3f2 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x13f3f2) #5 0x00007f0fe0f3fa69 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x13fa69) #6 0x00007f0fe0a9c195 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x29c195) #7 0x00007f0fe0f3fb16 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x13fb16) #8 0x00007f0fe1775b9e _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x175b9e) #9 0x000055bba7ee7cb2 main (hyprland-share-picker + 0x5cb2) #10 0x00007f0fe0027cd0 n/a (libc.so.6 + 0x27cd0) #11 0x00007f0fe0027d8a __libc_start_main (libc.so.6 + 0x27d8a) #12 0x000055bba7eeb3e5 _start (hyprland-share-picker + 0x93e5) ELF object binary architecture: AMD x86-64 Sep 07 12:39:46 pc hyprland-share-picker[35639]: qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" Sep 07 12:39:46 pc hyprland-share-picker[35639]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. Sep 07 12:39:46 pc systemd-coredump[35673]: [🡕] Process 35639 (hyprland-share-) of user 1000 dumped core. Stack trace of thread 35639: #0 0x00007f920688e83c n/a (libc.so.6 + 0x8e83c) #1 0x00007f920683e668 raise (libc.so.6 + 0x3e668) #2 0x00007f92068264b8 abort (libc.so.6 + 0x264b8) #3 0x00007f92070a0098 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0xa0098) #4 0x00007f920773f3f2 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x13f3f2) #5 0x00007f920773fa69 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x13fa69) #6 0x00007f920729c195 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x29c195) #7 0x00007f920773fb16 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x13fb16) #8 0x00007f9207f75b9e _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x175b9e) #9 0x000055742869ecb2 main (hyprland-share-picker + 0x5cb2) #10 0x00007f9206827cd0 n/a (libc.so.6 + 0x27cd0) ```

This is the output from coredumpctl info:

            PID: 38963 (hyprland-share-)
           UID: 1000 (itsdrike)
           GID: 1000 (itsdrike)
        Signal: 6 (ABRT)
     Timestamp: Thu 2023-09-07 12:40:37 CEST (2min 56s ago)
  Command Line: hyprland-share-picker
    Executable: /usr/bin/hyprland-share-picker
 Control Group: /user.slice/user-1000.slice/user@1000.service/session.slice/xdg-desktop-portal-hyprland.service
          Unit: user@1000.service
     User Unit: xdg-desktop-portal-hyprland.service
         Slice: user-1000.slice
     Owner UID: 1000 (itsdrike)
       Boot ID: c1aad8a91fb142019e5c513b5673b0f9
    Machine ID: c78c910ae0654dafa2f7936ca950fd5b
      Hostname: pc
       Storage: /var/lib/systemd/coredump/core.hyprland-share-.1000.c1aad8a91fb142019e5c513b5673b0f9.38963.1694083237000000.zst (present)
  Size on Disk: 343.8K
       Message: Process 38963 (hyprland-share-) of user 1000 dumped core.

                Stack trace of thread 38963:
                #0  0x00007f9985a8e83c n/a (libc.so.6 + 0x8e83c)
                #1  0x00007f9985a3e668 raise (libc.so.6 + 0x3e668)
                #2  0x00007f9985a264b8 abort (libc.so.6 + 0x264b8)
                #3  0x00007f99862a0098 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0xa0098)
                #4  0x00007f998693f3f2 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x13f3f2)
                #5  0x00007f998693fa69 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x13fa69)
                #6  0x00007f998649c195 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x29c195)
                #7  0x00007f998693fb16 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x13fb16)
                #8  0x00007f9987175b9e _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x175b9e)
                #9  0x000055ae5fd61cb2 main (hyprland-share-picker + 0x5cb2)
                #10 0x00007f9985a27cd0 n/a (libc.so.6 + 0x27cd0)
                #11 0x00007f9985a27d8a __libc_start_main (libc.so.6 + 0x27d8a)
                #12 0x000055ae5fd653e5 _start (hyprland-share-picker + 0x93e5)
                ELF object binary architecture: AMD x86-64

Here's the zst archive artifact produced: https://file.io/kNcVIqoEhaRC (github doesn't let you attach files of this type, so I used file.io)

vaxerski commented 1 year ago

missing qt6-wayland (or qt5-wayland)

ItsDrike commented 1 year ago

Oh, I did have qt6-wayland, but yeah, I was missing qt5-wayland, that did the trick, thanks! Maybe it would be worth it to add a more intuitive message there rather than it just fully crashing? That is, if that's even possible to detect here.

vaxerski commented 1 year ago

I don't think it is

edit: actually if we read stderr it probably is, you can make a feature req