Skip to content

bug: libobs: switching scenes quickly with a transition override locks the program on one scene (upstream obsproject/obs-studio#11914) #555

Closed

Description

@rdoupe

Upstream OBS bug, reported by millerdq in obsproject/obs-studio#11914 (OBS 30.2.3; Fenrirthviti confirmed the steps; jnortheastfilms on 2026-10-10: "still occurring on the latest version"). Outside Studio Mode, with a default transition that has a duration (Fade 1000 ms) and a Cut override on one scene, switching between that scene and another one quickly locks the program: later switches are logged and the scene list changes, but the program output and the recording stay on one scene until a third scene is picked or Studio Mode is toggled. Still broken in this fork.

Location

  • frontend/widgets/OBSBasic_Transitions.cpp OBSBasic::TransitionToScene() swaps the program transition for the scene's override (OverrideTransition(), line 274, called at line 378), and TransitionFullyStopped() (line 285, also called when the start fails, line 401) swaps the default back.
  • libobs/obs-source-transition.c obs_transition_swap_begin() (line 1032) copies the old transition's two sources to the new one (copy_source_state(), line 1014) but not that a transition is running. Swapped while Fade is half way from A to B, Cut holds A and B without transitioning: it never finishes, obs_transition_start() towards A returns false (line 349, "A is already shown"), and the frontend swaps Fade back in in the same state. From then on every start towards B finds B already set as the destination (set_source(), line 235) and does not transition: the program stays on A.

Class

Output stuck on the wrong scene (no crash). It reaches recordings and streams.

How it is reached

  • Clicking scenes quickly (the report), scene hotkeys, obs-websocket SetCurrentProgramScene, Stream Deck and other controllers.
  • Needs a scene transition override (Cut, or any transition other than the default) on one of the scenes, and a switch while the default transition is still running. Picking another transition while one runs goes through the same swap.

Reproduced in the current release

AppImage 33.0.0-beta6-799, driven headless over obs-websocket and recording the program (two color scenes, A red with a Cut override, B green without; default Fade 1000 ms; Studio Mode off):

Steps Program (from the recording)
A, B, A, B, 1.8 s apart (control) A, B, A, B (correct)
12 switches A/B 0.15 s apart, ending on B A (expected B)
then A, B, A, B, 1.8 s apart A, A, A, A (stuck)

GetCurrentProgramScene reports B at the end, as the scene list does.

Proposed fix and failing test

Fix: obs_transition_swap_begin() also hands over the running state (video and audio transitioning, start time, duration, mode and manual position), so the new transition finishes the one in progress and a new start interrupts it as usual. The same fix covers picking another transition while one is running.

RED test (cmocka, test_transition_swap, core video under a private display, skips without one), driving libobs the way the frontend does:

  • swap a running Fade for Cut: Cut has to be transitioning;
  • then start Cut towards A: has to start;
  • swap Fade back and start it towards B: Fade has to transition;
  • guard: swapping an idle transition hands over the scene shown and the new one starts.

The first three fail today in both libobs lanes.

Activity

  1. rdoupe commented on Oct 13, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: this issue.

    1. RED: test_transition_swap (4 cases): swapping the program transition in the middle of a transition (as transition overrides do) leaves the new transition holding both scenes without transitioning, so it never starts towards either scene again; a guard checks that swapping an idle transition still works. 3 of 4 fail today.
    2. GREEN: obs_transition_swap_begin() hands over the running transition (state, start time, duration, mode), not only its sources.
      PR today.
  2. rdoupe commented on Oct 13, 2026

    @rdoupe
    CollaboratorAuthor

    @millerdq you reported this in obsproject/obs-studio#11914 (with a Fade default and a Cut override on one scene, switching quickly between that scene and another locks the program on one scene), so a heads-up: it's fixed here in obs-rust by #556, with a regression test.

    Cause: when OBS swaps from one transition to another mid-switch (here Fade to the Cut override and back), obs_transition_swap_begin() copied the two scenes to the new transition but not the fact that a transition was running, or how far along it was. The new transition then refused the next start and the swap back left both scenes inactive, so later switches were logged but the program stayed put. It now also hands over the running state (timing, duration, mode and manual position), so the new transition finishes the one in progress and the next switch starts normally. In the obs-rust release, quick switches at 0.15 s and 0.3 s gaps left the program on the wrong scene 3 times; a build with the fix got 0 wrong out of 9 at gaps from 0.05 to 0.5 s.

    Workaround on stock OBS (not tested here): use the same kind of transition for the override as the default (or no override), or leave a full transition duration between switches.

    It will be in the next obs-rust daily release after 0.1.0-beta.20261012: https://github.com/obs-rust/obs-studio/releases (Windows, macOS and Linux builds; on Arch it's obs-studio-rust-git in the AUR). obs-rust is an AI-assisted fork of OBS.

    If you get a chance to try it, a reply here on whether quick switches still lock the program would really help.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions