Closed Bug 1678680 Opened 4 years ago Closed 4 years ago

[PipeWire] Screen-sharing on Wayland makes Firefox crash under some conditions

Categories

(Core :: WebRTC, defect)

Firefox 85
Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: filman230, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached image firefox-choices-screensharing.png (deleted) —

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

I am using Firefox under Archlinux with Gnome Wayland.
To share a specific program I have to select "Share entire screen", the my Desktop Environment (Gnome Wayland) shows me a pop-up to chose what to share.
I select a specific window (like a terminal), and confirm.
There is no problem at this point, but Firefox crashes when you resize the terminal, and only when you make it bigger.

I think it's because when you chose "Share entire screen", Firefox expects a constant resolution, or at least not a suddenly bigger one.

Under Wayland, it seems that it's Pipewire that manages all the screen-sharing, so the choices are not very adapted. Firefox probably just allow screen-sharing and let Pipewire manage from this point.

You can reproduce the problem using https://meet.jit.si/ or any other service that let you share your screen.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Can you please create a screencast of the issue? (see https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en)
Thanks.

Flags: needinfo?(filman230)
Attached video screencast of the issue.webm (deleted) —
Flags: needinfo?(filman230)

So it seems that it crashes not only when the window is resized to a bigger size, sorry for the wrong indication.

That's interesting, Thanks! Will look at it, seems to be a PipeWire issue.

Assignee: nobody → stransky
Component: Widget: Gtk → WebRTC
Summary: Screen-sharing on Wayland makes Firefox crash under some conditions → [PipeWire] Screen-sharing on Wayland makes Firefox crash under some conditions
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Linux

This is a multi-thread issue. Data are copied to current_frame_ at BaseCapturerPipeWire::CaptureFrame() callback while current_frame_ is also modified/resized at BaseCapturerPipeWire::HandleBuffer() from another thread.

I'm going to report it upstream too.

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/67a0bedb38ee
[PipeWire] Lock current_frame_ access as it can be used from multiple threads, r=dminor
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch

Thanks for your work on this. Resizing the shared window indeed no longer makes Firefox crash as of Firefox 85. However, Firefox still crashes if I toggle the shared window between full screen/presentation mode and windowed mode.

Steps to reproduce (Fedora 33):

  1. Share a Evince window in a Wayland session.
  2. Switch Evince to presentation mode.

(In reply to Casey from comment #12)

Thanks for your work on this. Resizing the shared window indeed no longer makes Firefox crash as of Firefox 85. However, Firefox still crashes if I toggle the shared window between full screen/presentation mode and windowed mode.

Steps to reproduce (Fedora 33):

  1. Share a Evince window in a Wayland session.
  2. Switch Evince to presentation mode.

Filed as Bug 1693849, Thanks.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: