Skip to content

[Bug]: OpenScreen crashes when starting a recording on Ubuntu 24.04 #1340

Open

Description

@PyVoyager

Search existing issues

  • I have searched the existing issues

Describe the bug

I installed OpenScreen 2.1.1 on Ubuntu 24.04. When I select the screen and start recording, the application crashes with this error:
The Linux capture helper exited (code=null, signal=SIGSEGV)
The crash report shows a segmentation fault inside OpenScreen's bundled FFmpeg library (libavcodec.so.62) while opening a video codec (avcodec_open2).
My system has AMD Radeon graphics. VA-API is available and reports H.264 encoding support.
Could you help identify the cause and advise how to fix this?
Thank you.

Expected behavior

...

To Reproduce

No response

Screenshots

Image

OS

Linux

OS Version

Ubuntu 22.04

Other OS

No response

Browser

Chrome

Browser Version

155.0.8059.84 (Official Build) (x86_64)

Other Browser

No response

Device Type

Laptop

Other Device

No response

Additional context

No response

Activity

  1. EtienneLescot commented on Oct 19, 2026

    @EtienneLescot
    Member

    Thanks for the report. The libavcodec crash in avcodec_open2 is a lead, but your report says both Ubuntu 24.04 and 22.04: which one is it? Could you also send the Mesa version, the output of vainfo, the lines of the terminal output containing capture-linux after the crash, and a Save Diagnostics file if the app still opens? That tells us which encoder it tried to open.

  2. PyVoyager commented on Oct 24, 2026

    @PyVoyager
    Author

    Sorry for the delay. The OS is Ubuntu 24.04.5 LTS (22.04 was my mistake).

    I updated to 2.1.2. Now recording never starts: I select "Entire Screen" in the GNOME Share Screen dialog and click Share, and after 1–2 seconds OpenScreen shows "Error: The screen capture request was cancelled." So I can't reach the old libavcodec crash anymore.

    System:

    • Ubuntu 24.04.5, GNOME 46, X11 session
    • xdg-desktop-portal-gnome 46.2
    • AMD Radeon R5 (carrizo), Mesa 25.2.8
    • vainfo: H.264 encode supported (VAEntrypointEncSlice), HEVC decode only

    Log:

    [capture-linux] click-capture-unavailable: no readable /dev/input pointer device ...
    [capture-linux] click-capture-unavailable: no readable /dev/input pointer device ...
    [capture-linux] portal-cancelled: The screen capture request was cancelled.
    Could not prepare the native Linux capture: Error: The screen capture request was cancelled.
    [native-linux] starting capture { prepared: false, cursor: { mode: 'editable-overlay' }, video: { fps: 60 } }
    [capture-linux] portal-cancelled: The screen capture request was cancelled.
    Failed to start native Linux recording: Error: The screen capture request was cancelled.
    

    The portal itself works: calling the ScreenCast portal directly (CreateSession -> SelectSources -> Start) with the same options (types=1, cursor_mode=4, persist_mode=2) and clicking Share returns a stream normally.

    Two "click-capture-unavailable" lines appear before the first cancel, so maybe two capture sessions are started at once.

    Save Diagnostics is not attached: the app hangs after the error.

  3. marcscama commented on Oct 25, 2026

    @marcscama

    I confirm a similar bug with X11 with Debian Sid KDE! Wayland works.

  4. EtienneLescot commented on Oct 28, 2026

    @EtienneLescot
    Member

    Thanks @PyVoyager, your log was the key: the two click-capture-unavailable lines do mean two capture sessions. A second Record press while the GNOME picker is open started a second one, and the two discarded each other's grant, so prepared: false followed your Share. #1413 ignores that second press.

    One question to confirm it is your case: did the picker take a moment to show, or open behind another window, so that Record got pressed again? If you saw only one dialog and pressed once, the X11 portal itself is at fault and #1328's direct X11 capture is the way. @marcscama, same question on KDE X11.

  5. marcscama commented on Oct 28, 2026

    @marcscama

    Thanks. Not the double-press case on my side: I pressed Record once, and no picker dialog appeared at all. So it’s the second case, the X11 portal itself is at fault.

    Debian sid, KDE Plasma on X11 (kwin_x11), xdg-desktop-portal 1.20.4, xdg-desktop-portal-kde 6.6.5, OpenScreen 2.1.2 (.deb).

    In my diagnostic the two failures are sequential, not overlapping: prepare (CreateSession fails), then start ~3 s later after the countdown (fails again), each within ~50 ms, with portal-failed: CreateSession: Portal request didn't succeed: Other (not portal-cancelled). The portal journal says each time:
    xdp-kde-screencast: zkde_screencast_unstable_v1 does not seem to be available
    KWin only exposes that protocol on Wayland (known KDE limitation: https://bugs.kde.org/show_bug.cgi?id=454985). Wayland works for me.

    One caveat for #1328: on KDE X11 org.freedesktop.portal.ScreenCast is on the bus (busctl --user introspect org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop lists it), only CreateSession fails. A check based on the interface being absent (the Xfce case) wouldn’t select direct X11 capture here, so it should also cover a failing CreateSession.

    Happy to test a #1328 build on KDE X11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions