Skip to content

obs-properties: Preserve parameter destructor ordering - #1939

Merged
zackees merged 2 commits into
obs-rust:masterfrom
ProtonDev-sys:fix/1938-properties-param-order
Oct 23, 2026
Merged

zackees merged 2 commits into
obs-rust:masterfrom
ProtonDev-sys:fix/1938-properties-param-order

Conversation

@ProtonDev-sys

@ProtonDev-sys ProtonDev-sys commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1938

What and why

When obs_properties_set_param replaces or clears a parameter, its previous destructor now sees the original parameter, matching C. Invoke it before writing the replacement and with no active RefCell borrow, so it can query and update properties. This adds 11 production lines and removes 3, without a callback-list allocation.

RED ? GREEN

  • RED f534ddf44: replacement_destructor_observes_old_param_like_c fails on DESKTOP-3FLAOFG (Ubuntu 24.04/WSL, pinned soldr 0.9.38/Rust 1.98.1). The unchanged C oracle observes the old parameter; Rust records (false, 1, true, 42) instead of (true, 1, true, 42).
  • GREEN: the same regression passes in debug and release, including both non-null and null replacements and final destructor ownership. The complete core-state suite passes: 1011 passed, 0 failed.
  • soldr cargo clippy -p obs-data --test obs-tests-core --locked -- -D warnings, soldr cargo fmt --all --check, and git diff --check pass on that PC. SOLDR_RUSTC_WRAPPER=none throughout.
  • Tier 3 compares callback-time state with the unchanged C oracle. Existing Tier 2 C tests/public headers are unchanged; required PR CI remains the merge gate. Tier 4 and real UI/protocol/log runs do not apply to this callback-state fix.

Checklist

  • Base is master; bug: obs-properties: parameter destructor observes its replacement #1938 claimed; no competing PR found.
  • RED test commit precedes GREEN implementation.
  • Feature ledger updated on the existing hybrid application entry.
  • Focused debug/release tests, full core-state suite, clippy and formatting passed.
  • Optional local gate attestation; PR CI runs the required checks.

@zackees zackees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review: matches C obs_properties_set_param. The old destructor runs on the old parameter before the replacement is stored, and the RefCell borrow is dropped before the callback, so the callback can reenter the properties API. RED→GREEN is recorded, there is a Tier 1 lifecycle test, and the ledger line is present. LGTM.

@zackees
zackees added this pull request to the merge queue Oct 23, 2026
Merged via the queue into obs-rust:master with commit 3249b96 Oct 23, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: obs-properties: parameter destructor observes its replacement

2 participants