WebCord: Segfault on Screen Share
Aknowledgements
-
I have checked that there’s no other issue describing the same or similar problem that I currently have, regardless if it has been closed or open.
-
I can confirm that this is not an issue with the Discord website, but it is a problem specific to the WebCord itself.
-
/ I have verified this issue is not a bug within Chromium engine by checking, if this bug can be reproduced in Discord web on Chromium/Chrome or any other Chromium-based browser that uses unpatched/upstream Chromium engine (i.e. browsers which treats fixing Chromium bugs out of their scope and doesn’t do anything about them, either to patch or mitigate them).
-
I have tried running the build from the
masterbranch and it does not have any fixes implemented according to my issue. -
My issue describes one of the unstable and/or not fully implemented features.
-
I have found a workaround to mitigate or temporarily fix this issue in affected releases (please write it in Additional context section below).
Operating System / Platform
🐧️ Linux
Operating system architecture
x64 (64-bit Intel/AMD)
Electron version
22.0.0
Application version
v3.10.1
Bug description
Pressing the “Screen share” button in webcord immediately segfaults. i have tried this both through Flatpak and the rpm file in the latest release.
/app/bin/run.sh: line 9: 3 Segmentation fault (core dumped) env TMPDIR="$XDG_RUNTIME_DIR/app/${FLATPAK_ID:-io.github.spacingbat3.webcord}" zypak-wrapper /app/bin/webcord/usr/bin/webcord $FLAGS "$@"
This works in Chromium just fine
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 39 (14 by maintainers)
Meanwhile on flatpak you can revert to latest working version and disable auto updating:
I can confirm downgrading to 3.10.0 no longer segfaults on screen share.
Also @ZirixCZ @m-wynn please avoid reporting / confirming if the issue affects Flatpaks. While @m-wynn did confirm this issue affects RPMs , I just mention you all to avoid reporting the issue I won’t fix as I’m not a maintainer of Flatpak builds.
Looks like hardcoding it or calculating on my own is viable workaround for the recent segfault. However, I’m unsure if for everyone it returns something like
screen:1:0or it is actuallyscreeen:X:0and I have to calculateXfor each user based on env vars like$WAYLAND_DISPLAYor maybe even$DISPLAYon its own (docs tell it is serial indentifier, but I guess it always starts from1in normal circumstances – or at least always invokes capturer with1on Wayland).Going to update that this is indeed an issue, you can rebase to the latest working version like so
https://docs.flatpak.org/en/latest/tips-and-tricks.html#downgrading
And to stop updating:
(I also see that someone else has posted a similar command, I believe mine downgrades it to a newer version than that).
EDIT: Apparently any commit newer than what they posted doesn’t work, which is weird. But I’ve updated this comment to include the appropriate commit.
Screw this, I think I just downgrade Electron for now and bump WebCord major version number just to keep with the SemVer. I’ll also avoid major version bumps in
package.jsonwithout Electron version bump. Maybe I’ll even refactorhuskyscripts to even prevent commits on local repo that will bump Electron without bumping WebCord version (same rule should be for blocking dependency and app version bumps without updatingpackage-lock.json.I should’ve known bumping a framework version and releasing it as patch could cause more bad than good. Personally I felt that, but since I weren’t much familiar with the semver releases of desktop apps rather than libraries, I just thought to reserve
majorfor like a complete code refactors or to announce some key features being implemented. That was a terrible idea, lesson taken and since WebCord 4.0.0 you will be able to expect a release model that will suggest you whenever something is likely going to cause any breakage to some wokflows (I’ll then reserve patch releases for a basically critical bug fixes and security patches, so you could expect more major and minior version bumps).Segfaults on Wayland here too.
3.10.1 segfaults, solution is to go back to 3.10.0 for the moment.
I should note that the only reason I use webcord is because it can screen share on Wayland, so not having this feature working seems lacking.
Nothing really changed in WebCord in terms of screenshare implementation outside of Electron / Chromium engine version bump. I suspect
v3.10.0works fine, doesn’t it?I have a feeling this has to do sth with the portals and Wayland – if you have all dependencies needed for the portals to work, I guess it’s then a matter of downgrading an Electron to the older version, which unlike to the latest still has some issues with the tray, but might have other stuff functional.
just confirmed version 4.0.0 is crashing with wayland and previous release (3.10.2) is working properly
It seems this is an issue with the
webcord-binAUR package as the normalwebcordpackage works fine