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.
Found while deciding whether the live validation sweep can exercise
CreateProfileandRemoveProfile. It cannot, and the reason is worth recording. OBS 32.2.2, obs-websocket 5.7.What happens
CreateProfilemakes the new profile the active one.RemoveProfileon that same profile deletes the directory but leaves OBS's active-profile pointer on it. From then on:config_save_safe: failed to write to ...\__obsws_probe_59cd47f3\basic.ini.tmp, 30 seconds after that profile was removed;RemoveProfilecalls answer success and remove nothing, so profiles accumulate on disk;SetVideoSettings,SetStudioModeEnabled) takes OBS down. No crash dump is written.Both requests are also applied asynchronously:
GetProfileListimmediately afterCreateProfiledoes not list the new profile, and immediately afterRemoveProfilestill does. Waiting does not help; five rounds polling for 2.5s each never observed a removal complete after the first.Log
For a client
Never remove the profile
CreateProfilejust made without switching away first:CreateProfilethenSetCurrentProfile(original)thenRemoveProfile(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:
RemoveProfileshould refuse to remove the active profile, or move the active pointer before deleting it.