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
bug: obs-properties: parent callbacks can destroy child groups twice #1943
rust/obs-properties/src/props.rs:214-231 snapshots every destructor before invoking any callback. src/ffi/obs_properties.rs:169-170 runs that snapshot afterward. props::remove_by_name:304-321 drops a removed group before the shim invokes its callbacks. The original C invokes the parent destructor before it traverses the remaining properties and keeps each group alive through its destructor.
Class
Callback lifecycle / duplicate destruction, with premature group teardown.
How it is reached
A trusted local plugin's parent parameter destructor removes one of its property groups. That removal invokes the child group's destructor. Rust's previously collected snapshot then invokes the same child destructor again; C invokes it only once. A callback that releases its parameter could therefore release it twice. Destructors inspecting their own removed group's contents also need those handles to stay live until the callback returns.
Proposed fix and failing test
Execute callbacks incrementally with no active RefCell borrow, inspecting descendants after the parent callback and keeping removed groups live during callbacks. Add deterministic parent-removes-group and parent-adds-group cases against the unchanged C oracle to the existing core-state executable, plus a safe lifetime test. Existing C tests and public headers stay unchanged.
Add deterministic callback lifecycle regressions against the unchanged C oracle: parent removes/adds a group, and removed group remains live during its callback.
Releasing #1943 at the user request to wrap up. Three deterministic RED cases were reproduced on DESKTOP-3FLAOFG (duplicate child callback, missed newly added group, premature group storage release). The proposed fix and regressions are preserved locally on fix/1943-properties-destroy-lifetime; GREEN verification is incomplete because SSH access hit Exceeded MaxStartups. No completed fix is claimed. Separate parameter-order fix #1939 has merged.
Claiming: #1943 (released above; the earlier branch was never pushed, so starting fresh).
RED: deterministic parent-removes-group, parent-adds-group and removed-group-lifetime cases against the unchanged C oracle, in the existing test binary.
GREEN: run destructor callbacks incrementally with no RefCell borrow held, walking descendants after the parent callback, and keep removed groups alive until their callbacks return.
Activity
ProtonDev-sys commentedon Oct 23, 2026
Claiming: #1943.
First PR expected this session. Separate scope from parameter replacement bug: obs-properties: parameter destructor observes its replacement #1938/obs-properties: Preserve parameter destructor ordering #1939.
ProtonDev-sys commentedon Oct 23, 2026
Releasing #1943 at the user request to wrap up. Three deterministic RED cases were reproduced on DESKTOP-3FLAOFG (duplicate child callback, missed newly added group, premature group storage release). The proposed fix and regressions are preserved locally on fix/1943-properties-destroy-lifetime; GREEN verification is incomplete because SSH access hit Exceeded MaxStartups. No completed fix is claimed. Separate parameter-order fix #1939 has merged.
zackees commentedon Oct 23, 2026
Claiming: #1943 (released above; the earlier branch was never pushed, so starting fresh).
obs-properties: run destroy callbacks like the C (obs-rust#1943) (obs…