Repository navigation
Description
Upstream bug, reported by sgaldeano in obsproject/obs-studio#13905 (September 2026, macOS 15, OBS 32.2.2, still open, no replies). GetInputPropertiesListPropertyItems for the display_uuid property of a macOS Screen Capture (screen_capture) input crashes OBS every time. xiaoshao9704 hit the same crash with the application property (macOS 26.5, OBS 32.1.2) and opened obsproject/obs-websocket#1355 with a null guard (open, no review). Still present in this fork: submodule at obs-rust/obs-websocket 0d663ee, and the macOS Screen Capture source here adds the same placeholder entries.
Location
plugins/obs-websocket/src/utils/Obs_ArrayHelper.cppUtils::Obs::ArrayHelper::GetListPropertyItems(), lines 270 and 277:TheitemData["itemName"] = obs_property_list_item_name(property, i); ... itemData["itemValue"] = obs_property_list_item_string(property, i);
const char *goes straight into a json value. nlohmann::json builds astd::stringfrom it, and a NULL pointer throwsstd::logic_error("basic_string: construction from null is not valid"). Nothing catches it on the websocket thread, so OBS aborts.- libobs keeps list items as they were added (
obs_property_list_add_string()stores a NULL name or value as NULL).plugins/mac-capture/mac-sck-common.m.hadds a placeholder at the top of the display list (obs_property_list_add_string(display_list, " ", NULL), line 109) and the application list (obs_property_list_add_string(application_list, " ", 0), line 207), so those two properties always hold such an item. Any plugin or script can add one too.
Class
Crash (uncaught exception, SIGABRT) from a plain websocket request.
How it is reached
CreateInput (or any existing input whose list property has an item with a NULL name or NULL string value), then GetInputPropertiesListPropertyItems with that propertyName. On macOS: a Screen Capture input and display_uuid or application. Upstream: obsproject/obs-studio#13905, obsproject/obs-websocket#1355.
Reproduced in the current release
v0.1.0-beta.20261014 AppImage on Linux, headless (private Xvfb, private D-Bus, fresh HOME, --multi). A Lua script source (loaded through the scene collection's Scripts tool entry) registers an input with three list properties: a string list whose first item is (" ", NULL) like the macOS placeholder, an int list whose first item has a NULL name, and a plain string list as a control. Websocket client: CreateInput, then GetInputPropertiesListPropertyItems:
| Property | Result |
|---|---|
| plain string list | [{"itemName": "One", "itemValue": "one", "itemEnabled": true}] |
| first item has a NULL value | connection lost; OBS aborted: terminate called after throwing an instance of 'std::logic_error', what(): basic_string: construction from null is not valid |
| first item has a NULL name | the same abort |
Current master (2d358b8, submodule 0d663ee), full build with frontend and obs-websocket, the same source as a C test module: the same two aborts, the control answers.
Proposed fix and failing test
Fix (in the obs-rust/obs-websocket fork, then a submodule bump here; port of obsproject/obs-websocket#1355 by xiaoshao9704): GetListPropertyItems() reports a NULL name or NULL string value as an empty string. That is also what the properties dialog stores when such an entry is picked (QByteArray(nullptr) gives ""), so a client can send the value back with SetInputSettings and get the same result as in the UI. Items with a name and value are reported as before.
RED test (cmocka, test_ws_list_property_items): compiles the plugin's ArrayHelper against libobs (no libobs startup, no display) and builds list properties with a NULL value and a NULL name. Today 2 of 3 cases fail (GetListPropertyItems threw 'basic_string: construction from null is not valid'); the control with ordinary items passes.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Oct 17, 2026
Claiming: this issue.
Claiming: this issue.
test_ws_list_property_itemscompiles obs-websocket's ArrayHelper against libobs and builds list properties with an item that has a NULL value (like the macOS Screen Capture placeholder) and one with a NULL name: today both make the helper throwstd::logic_error. Reproduced in 0.1.0-beta.20261014 and on master: OBS aborts onGetInputPropertiesListPropertyItems.Fork PR today; the obs-studio PR follows once it merges.
rdoupe commentedon Oct 20, 2026
Claiming again (the claim lapsed while the fix waits for review): the fix is obs-rust/obs-websocket#18 (CI green, mergeable). The obs-studio side, the submodule bump and its regression test, is ready on a branch and opens as soon as #18 merges.
utils: Report list items without a name or value as empty strings (#18)
plugins/obs-websocket: bump for the parallel RequestBatch notify fix (o…
rdoupe commentedon Oct 24, 2026
Claiming: #1266. The fix landed through the obs-websocket bump in #1996; I'm adding the regression test that shows it.
rdoupe commentedon Oct 24, 2026
@sgaldeano you reported this in obsproject/obs-studio#13905: obs-websocket's
GetInputPropertiesListPropertyItemsaborted OBS on a list item with a NULL name or value, which the macOS Screen Capture display and application lists always contain. obs-rust now carries the fix from obsproject/obs-websocket#1355, and #2251 adds a regression test for it.The test builds a list property with a NULL item name and a NULL string value and passes it to the obs-websocket helper behind that request. Before the fix it threw, which aborts OBS on the websocket thread; with the fix, both come back as empty strings. That test ran headless on Linux, not on a Mac.
It will be in the next obs-rust daily release after 0.1.0-beta.20261023: https://github.com/obs-rust/obs-studio/releases (Windows, macOS and Linux builds; on Arch it's
obs-studio-rust-gitin the AUR). obs-rust is an AI-assisted fork of OBS, based on current OBS master, with extra bug fixes like this one.test: Cover obs-websocket list items with a NULL name or value (obs-r…