obsproject / obsproject/obs-studio

obs_frontend_set_current_scene crashes if not used in Studio Mode

Open
#3,385 13 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/confirmed
Dominant language
C
Stars
76.4k
Forks
10.2k
Avg merge
4d 23h
Merged PRs (30d)
12

Description

Platform

Operating system and version: Windows 10 v1909 Build 18363.1016
OBS Studio version: 25.0.8 (64 bit)

Expected Behavior

I'm using a Lua script to automatically change a scene after a certain period of time - see link here: https://gist.github.com/woganmay/78bad7577b52d0fbf09b2cefcd8a131f

I'm expecting that, after switching to Scene A, that OBS will automatically switch to Scene B after 5000 milliseconds. The callbacks and countdown timer work normally, and the scene does transition if I'm in Studio Mode.

Current Behavior

If I trigger this script while not in Studio mode, OBS will crash when attempting to call obs_frontend_set_current_scene. If I'm in Studio Mode, the scene switches normally.

Steps to Reproduce

  1. Load the Lua plugin linked above
  2. Create Scene A, Scene B and a third scene
  3. Without Studio Mode enabled, switch to Scene A and wait 3 seconds
  4. OBS becomes unresponsive and has to be force-quit
  5. Re-launch OBS, enable Studio Mode, stage Scene A and Transition to it
  6. Within 3 seconds, the current scene switches to Scene B

Video: https://www.youtube.com/watch?v=ljFxT26Pi9g

Additional information

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the crash with the linked Lua script and obs_frontend_set_current_scene while Studio Mode is disabled, then compare the same call with Studio Mode enabled. Done means the current scene changes without OBS becoming unresponsive or crashing in either mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.