Skip to content

RemoveProfile leaves OBS pointing at a deleted profile (upstream) #42

Description

@Agash

Found while deciding whether the live validation sweep can exercise CreateProfile and RemoveProfile. It cannot, and the reason is worth recording. OBS 32.2.2, obs-websocket 5.7.

What happens

CreateProfile makes the new profile the active one. RemoveProfile on that same profile deletes the directory but leaves OBS's active-profile pointer on it. From then on:

  • every profile save fails: config_save_safe: failed to write to ...\__obsws_probe_59cd47f3\basic.ini.tmp, 30 seconds after that profile was removed;
  • further RemoveProfile calls answer success and remove nothing, so profiles accumulate on disk;
  • the next request that touches configuration (SetVideoSettings, SetStudioModeEnabled) takes OBS down. No crash dump is written.

Both requests are also applied asynchronously: GetProfileList immediately after CreateProfile does not list the new profile, and immediately after RemoveProfile still does. Waiting does not help; five rounds polling for 2.5s each never observed a removal complete after the first.

Log

10:55:57.230: Removed profile '__obsws_probe_59cd47f3' (__obsws_probe_59cd47f3)
10:56:29.758: config_save_safe: failed to write to .../basic/profiles/__obsws_probe_59cd47f3\basic.ini.tmp
10:56:29.804: Created profile '__obsws_probe_e990d19a' (clean, __obsws_probe_e990d19a)
...
10:57:08.609: config_save_safe: failed to write to .../basic/profiles/__obsws_probe_86d9a7d1\basic.ini.tmp

For a client

Never remove the profile CreateProfile just made without switching away first: CreateProfile then SetCurrentProfile(original) then RemoveProfile(new). That costs two full configuration reloads, which is why the sweep does not do it and these two write requests stay unexercised.

The fix belongs upstream: RemoveProfile should refuse to remove the active profile, or move the active pointer before deleting it.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions