xdg-desktop-portal-wlr: Segmentation fault
I’m running arch with https://aur.archlinux.org/packages/xdg-desktop-portal-wlr-git/.
To reproduce:
- set
XDG_CURRENT_DESKTOP=swaybefore starting sway (same thing happens either way though) - run
xdg-desktop-portal-wlrin a terminal - Don’t run
xdg-desktop-portalbecause it seems there is already a systemd service for it - open chromium (https://aur.archlinux.org/packages/chromium-ozone/). Start a google hangouts call, open the dialog to share the screen
#0 0x0000555ca6b09d70 in ?? ()
#1 0x00007efd3c218651 in impl_set_io (object=0x555ca6af7c50, id=7, data=0x7efd3b1ad230, size=1688)
at ../pipewire/src/pipewire/stream.c:358
#2 0x00007efd3a97b88b in client_node_set_io (object=0x7efd3a8bb010, id=7, memid=<optimized out>, offset=560,
size=1688) at ../pipewire/src/modules/module-client-node/remote-node.c:455
#3 0x00007efd3a96e489 in client_node_demarshal_set_io (object=0x7efd3a8bb010, msg=<optimized out>)
at ../pipewire/src/modules/module-client-node/protocol-native.c:588
#4 0x00007efd3b1f565f in process_remote (impl=impl@entry=0x555ca6ae5900)
at ../pipewire/src/modules/module-protocol-native.c:667
#5 0x00007efd3b1f5bb8 in on_remote_data (data=0x555ca6ae5900, fd=<optimized out>, mask=<optimized out>)
at ../pipewire/src/modules/module-protocol-native.c:707
#6 0x00007efd3c56fcfc in loop_iterate (object=0x555ca6ac1f08, timeout=<optimized out>)
at ../pipewire/spa/plugins/support/loop.c:301
#7 0x0000555ca5fdf5ca in main (argc=<optimized out>, argv=<optimized out>)
at ../xdg-desktop-portal-wlr-git/src/core/main.c:154
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (3 by maintainers)
Commits related to this issue
- Add latest xdg-desktop-portal and xdg-desktop-portal-wlr with pipewire 0.3 support, see later in default.nix commit, and unmerged patch for service files in xdpw. To activate add environment variabl... — committed to calbrecht/nixpkgs-overlays by calbrecht 4 years ago
- Add firefox pipewire support patch from fedoraproject patch after the patch make it compile with fpermissive. to run screensharing sessions you have to start the screen sharing request and after cho... — committed to calbrecht/nixpkgs-overlays by calbrecht 4 years ago
- Add firefox pipewire support patch from fedoraproject patch after the patch make it compile with fpermissive. to run screensharing sessions you have to start the screen sharing request and after cho... — committed to calbrecht/nixpkgs-overlays by calbrecht 4 years ago
I started contributing to wlroots when I barely knew C (had written a single small C project). All it takes is patience and not being afraid to ask questions. 😉
The project is written in C, so it would definitely be helpful if you knew C. It is also good to familiarize yourself with wayland and using wayland protocols, how to work with d-bus, and how to build a producer plugin for pipewire. The example source code in wlroots for screencopy, and the example in pipewire, called video-src.c, are the two primary examples I needed to get started.
All of that being said, there are no hard requirements. I’m frankly not that good at C and @emersion is still kind enough to help me clean up my PRs.
I didn’t mean deadline. I understand you guys do it for free and in your free time and I’m in no way pushing you for doing this or that or doing it quicker. I just wanted some context on how complex the thing is and how advanced is the progress, so that I can make choices for my own things better.
Anyway, thanks for all the information. I’ll probably join #sway on Freenode for more help.
What skills are expected for contributing?
@danshick Thanks for your help. I can confirm that starting
xdg-desktop-portal-wlragain after it segfaults is enough to make screen sharing work with ozone chromium.For example, I run it like this:
xdg-desktop-portal-wlr -p BGRx; xdg-desktop-portal-wlr -p BGRxThe chromium preview of “Entire screen” is empty (white) and there is only one choice, but it is possible to select it and it shares one of my screens.
Never mind, I can reproduce. Took me a while to build chromium-ozone.
I’m almost positive from the trace logs that this is a manifestation of #13. Chromium seems to be making multiple calls to xdpw immediately upon opening the share dialog, because it also wants to query us for individual “WINDOW” shares in addition to “MONITOR” shares.
This’ll get fixed with session support that I’ve been promising to finish.
Edit:
I think I’ll leave this open for now so I remember to test this when the time comes. For now, I would suggest sticking to Firefox if you can.