Repository navigation
Description
Summary
A config from OBS before 31.0 is not migrated when its global.ini has no [General] LastVersion. OBS writes LastVersion only on a clean exit, so this happens when OBS never exited cleanly: for example when it runs as a service and is always stopped with a signal it does not handle, or killed.
The user settings then stay in global.ini, user.ini starts empty, and the first start opens the auto-configuration wizard as for a fresh install. While the wizard is open, all outputs are disabled (AutoConfig calls EnableOutputs(false)): recording, streaming, the replay buffer and the virtual camera do not start. On a headless or unattended host, nobody sees the wizard, so the outputs stay disabled until someone closes it.
The fork reaches this path on its first start after MigrateRustConfiguration() copied an upstream 30.x config. Upstream OBS 31+ has the same code.
Location
frontend/OBSApp.cpp OBSApp::InitGlobalConfig():
uint32_t lastVersion = config_get_int(appConfig, "General", "LastVersion");
if (lastVersion && lastVersion < MAKE_SEMANTIC_VERSION(31, 0, 0)) {
bool migratedUserSettings = config_get_bool(appConfig, "General", "Pre31Migrated");
if (!migratedUserSettings) {
bool migrated = MigrateGlobalSettings();With lastVersion == 0, the migration is skipped. Then OBSBasic::OBSInit() reads FirstRun from the (empty) user config and, because has_last_version is false too, queues on_autoConfigure_triggered.
Class
Logic error: a legacy config is treated as a fresh install. The user settings are not migrated, and the outputs are disabled by a dialog nobody can see.
How it is reached
Reproduced with the master build (aaed86f) on Debian 13, headless, OBS started by a systemd unit:
- A
~/.config/obs-studiowritten by OBS 30.2.3 (Debian package) that was always stopped by SIGTERM, soglobal.inihas[General] FirstRun=truebut noLastVersion. - Start the fork. It copies the config to
obs-studio-rustand starts. user.inihas only defaults. The "Auto-Configuration Wizard" window is open on the X display. A websocketStartRecordreturns success, but no recording starts and nothing is logged.
Proposed fix and failing test
Fix: also migrate when LastVersion is missing, if global.ini has [General] FirstRun and user.ini does not exist.
- OBS before 31.0 writes
FirstRuntoglobal.inion its first start. OBS 31.0 and later write it touser.ini. A fresh install has noFirstRuninglobal.ini, so it still gets the wizard. - When
user.inialready exists, do not migrate:MigrateGlobalSettings()would show an error box, which also blocks an unattended start. - With
LastVersionset, nothing changes.
To make the decision testable without a display, move it into a small pure helper, frontend/utility/settings-migration.hpp (ShouldMigratePre31Settings()).
RED test (cmocka, test_settings_migration, no widgets), 6 cases:
- no
LastVersion,FirstRuninglobal.ini, nouser.ini: migrate. Fails today. - fresh install (no
LastVersion, noFirstRun): no migration. Passes before and after. - no
LastVersion,FirstRun, butuser.iniexists: no migration. Passes before and after. LastVersion30.2.3: migrate; already migrated: no;LastVersion32.0: no. Pass before and after.
GREEN: the helper also migrates in the first case.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
vpacher commentedon Oct 15, 2026
Claiming: this issue.
frontend/utility/settings-migration.hpp(ShouldMigratePre31Settings(), no change in behaviour) and addtest_settings_migration(cmocka, no widgets). The case "noLastVersion,FirstRuninglobal.ini, nouser.ini" fails.user.iniare unchanged.PR today.
frontend: Migrate settings that lack LastVersion
frontend: Migrate pre-31 settings that lack LastVersion (obs-rust#816)
infra: Claim bot labels and assigns claimants, expires stale claims (o…