Skip to content

bug: obs-properties: parameter destructor observes its replacement #1938

Closed

Description

@ProtonDev-sys

Location

rust/obs-properties/src/ffi/obs_properties.rs:193-195 calls props::set_param, storing the replacement, before running the previous parameter's destroy callback. libobs/obs-properties.c.h:215-219 runs that callback before assigning the replacement.

Class

Callback ordering / C API compatibility regression.

How it is reached

A local plugin registers a properties parameter with a destructor retaining the properties handle. On replacement, obs_properties_get_param inside that destructor sees the new parameter in Rust and the old parameter in C. Callbacks may query and modify properties and run without a RefCell borrow. Only trusted local plugin callbacks are involved.

Proposed fix and failing test

Run the old callback without an active RefCell borrow before installing the replacement. Add a regression to the existing core-state executable and compare the same callback-time state with the unchanged C oracle. Cover non-null and null replacements, changes to properties flags from the callback, and final parameter/destructor ownership. Public headers and existing C tests remain unchanged.

Activity

  1. ProtonDev-sys commented on Oct 23, 2026

    @ProtonDev-sys
    ContributorAuthor

    Claiming: #1938.

    1. Add a callback-time regression against the Rust C ABI and unchanged C oracle and reproduce RED on DESKTOP-3FLAOFG.
    2. Preserve C's destruction order with a minimal fix, verify GREEN and the surrounding properties suite, then open a focused PR against master.
      First PR expected in this work session.
  2. added
    claimed
    on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions