OBS crashes when config directory creation fails
Opened this issue · 2 comments
Operating System Info
macOS 15
Other OS
No response
OBS Studio Version
31.1.2
OBS Studio Version (Other)
No response
OBS Studio Log URL
No OBS log available
OBS Studio Crash Log URL
No crash log available
Expected Behavior
When OBS fails to create the user configuration directory, it presents an appropriate error message and quits.
Current Behavior
When OBS fails to create the user configuration directory, it presents 2 error messages and then crashes.
Steps to Reproduce
- Launch OBS on a write-only file system
- Observe two error messages being shown
- Observe crash
Anything else we should know?
The main cause for the crash is the combination of code used in OBSApp::AppInit and OBSApp's destructor:
- When
MakeUserDirsfails inOBSApp::AppInit, an exception is thrown, which is caught by therun_programfunction. - When
run_programgoes out of scope, it'sOBSAppinstance namedprogramis destroyed and the destructor run - The destructor calls
applicationShutdown, which will then run the following line of code on macOS:
bool vsyncDisabled = config_get_bool(appConfig, "Video", "DisableOSXVSync");
config_get_booldoes not check if the first argument passed into it is anullptr, but ifMakeUserDirsfails,InitGlobalConfigis never run, but that function is responsible for initialisingappConfiganduserConfig- Thus
appConfigis anullptrat this point, crashing the application inconfig_get_bool
I can't start streaming your updates, I'm tired of waiting weeks for the plugins to be adjusted to the new version of OBS.
I can't start streaming your updates, I'm tired of waiting weeks for the plugins to be adjusted to the new version of OBS.
This is not an appropriate place to report issues with plugins. If you are having issues, use our support channels, or report the issues to the plugin developers directly. There isn't much we can do about plugins that don't stay updated, and you are more than welcome to not update immediately and monitor plugins you use for updates before doing so.