You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libobs: find_libobs_data_file crashes on macOS when the libobs bundle is not found #2538
On macOS, find_libobs_data_file() (libobs/obs-cocoa.m.h) crashes when libobs is loaded from a libobs.framework that has no bundle identifier (no Info.plist). [NSBundle bundleWithIdentifier:@"com.obsproject.libobs"] then returns nil, the path string is nil, and strlen(libobsDataPath.UTF8String) is strlen(NULL).
Every obs_find_data_file() call goes through it, so the first lookup crashes (for example obs_startup() loading default.effect in a host that has no graphics module yet, or a plugin's lookup).
It happens in CI: the macOS Rust Tier 2 stage Cargo [obs-c-reference] unchanged ctest suite runs the cmocka tests against build_rust/cargo-native-core/obs-c-reference/libobs.framework, which obs-build makes without an Info.plist. test_obs_core_info_characterization (test_find_data_file) crashes there with SIGSEGV, in both runs of #2514. Upstream OBS has the same code.
Reproduction on macOS: copy Versions/A/libobs of a built libobs.framework into a new libobs.framework with no Info.plist, and run test_obs_core_info_characterization with DYLD_FRAMEWORK_PATH set to its parent folder.
Fix
Return NULL when the bundle (or its path) is not found. obs_find_data_file() then searches the data paths from obs_add_data_path(), as on Linux and Windows. With the bundle present, nothing changes.
The other macOS difference (with the bundle, every lookup returns a Resources path, also for a missing file) is not part of this issue.
One PR: the NULL return in find_libobs_data_file. RED is master's macOS Rust Tier 2 cargo stage (test_find_data_file, SIGSEGV), reproduced locally with a libobs.framework without Info.plist.
Activity
vpacher commentedon Oct 26, 2026
Claiming: #2538
One PR: the NULL return in find_libobs_data_file. RED is master's macOS Rust Tier 2 cargo stage (test_find_data_file, SIGSEGV), reproduced locally with a libobs.framework without Info.plist.
libobs: Return NULL from find_libobs_data_file without the libobs bun…