#13905·obs-studio

macOS: GetInputPropertiesListPropertyItems on screen_capture's display_uuid crashes OBS (strlen(NULL) on the placeholder list entry)

Author: sgaldeanoCreated Sep 17, 2026Updated Sep 17, 2026

Operating System Info

macOS 15

Other OS

macOS 15.7.9 (24G830), Intel

OBS Studio Version

32.2.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

Inline below (the crash is deterministic from obs-websocket, no UI involved; happy to attach a full log on request).

OBS Studio Crash Log URL

Inline below.

Expected Behavior

GetInputPropertiesListPropertyItems for the display_uuid property of a screen_capture (macOS Screen Capture / ScreenCaptureKit) input returns the list of displays, like it does for the window property.

Current Behavior

OBS crashes (SIGSEGV in strlen) every time the request is made, with or without Screen Recording permission granted to OBS.

Crash log (faulting thread; obs-websocket is stripped):

Exception Type:  EXC_BAD_ACCESS (SIGSEGV), KERN_INVALID_ADDRESS at 0x0000000000000000
Thread 36 Crashed:
0  libsystem_platform.dylib   _platform_strlen + 18
1  obs-websocket              0x... (+76847)
2  obs-websocket              0x... (+485625)
3  obs-websocket              0x... (+333854)
4  obs-websocket              0x... (+240716)
5  obs-websocket              0x... (+873065)
6  obs-websocket              0x... (+830871)
7  QtCore
8  QtCore
9  libsystem_pthread.dylib    _pthread_start + 115

OBS log tail (the request arrives right after the source is created; nothing else is logged before the process dies):

08:17:30.805: User added source 'rigger.probe.capture' (screen_capture) to scene 'rigger.probe'

Cause (from source)

plugins/mac-capture/mac-sck-common.m, build_display_list() adds a placeholder entry at the top of the display list with a NULL string value:

// Add null entry to the top of the content list, to avoid inadvertent capture of the first enumerated display
// when opening the source's properties window
obs_property_list_add_string(display_list, " ", NULL);

plugins/obs-websocket/src/utils/Obs_ArrayHelper.cpp, GetListPropertyItems() builds a JSON string from every item's value:

} else if (itemFormat == OBS_COMBO_FORMAT_STRING) {
    itemData["itemValue"] = obs_property_list_item_string(property, i);

nlohmann::json constructing a string from a const char* that is NULL calls strlen(NULL). The window list's placeholder is an int (kCGNullWindowID), so window works; display_uuid (and the application list, if it uses the same pattern) does not.

Steps to reproduce

  1. Any macOS with OBS 32.2.2 and obs-websocket 5.7.4 (bundled).
  2. CreateInput with inputKind: "screen_capture" (any settings) in any scene.
  3. GetInputPropertiesListPropertyItems with propertyName: "display_uuid" for that input.
  4. OBS exits with the crash above.

Suggested fix

Either side fixes it; both would be robust:

  • mac-capture: obs_property_list_add_string(display_list, " ", ""); (an empty string instead of NULL for the placeholder).
  • obs-websocket: null-check the item name/string value in GetListPropertyItems and emit nullptr (JSON null) instead of constructing a std::string from NULL.

We carry the one-line mac-capture change as a local patch and can send it as a PR if that is the preferred side.