Skip to content

bug: recording shutdown wait can return before output becomes inactive #1391

Closed

Description

@zackees

Post-#1342 regression follow-up, refs #1283.

frontend/widgets/RecordingShutdownWait.hpp:44: State::Stopped() returns deactivated.load() || !(*active)(). libobs emits deactivate immediately before storing inactive, so a queued UI check can return true while output remains active. This can permit output teardown before final inactivity and deterministically explains the first unchanged recording-wait state assertion failure observed in PR #1333 CI run 39095486998 (not a proven explanation of every downstream failure).

Proposed fix: require inactive state before successful return; after deactivate, coalesced asynchronous checks bridge the interval while preserving the existing timeout and UI event processing.

RED sketch: new real QtCore/signal-handler test emits deactivate while active remains true, then clears active on a later event; successful wait must observe inactive. A never-inactive control must time out. Keep the existing recording shutdown test unchanged.

This is a narrow correction to the merged implementation, not a replacement of the original #1283 work.

Activity

  1. zackees commented on Oct 18, 2026

    @zackees
    MemberAuthor

    Claiming: narrowly scoped post-#1342 recording-wait early-return regression. 1. Add deterministic new Qt/signal-handler RED cases with inactive-store and never-inactive controls. 2. Fix the private helper without changing existing tests. 3. Verify unchanged recording-wait coverage and submit a focused PR. Expected draft today; this is the critical shipping blocker for #1333.

  2. added
    claimedAn agent or person has claimed this; check the claim comment before starting
    and removed
    claimedAn agent or person has claimed this; check the claim comment before starting
    on Oct 18, 2026
  3. zackees commented on Oct 23, 2026

    @zackees
    MemberAuthor

    Fixed by #1392 (84aac88). State::Stopped() now returns only !(*active)(). After deactivate, coalesced 1 ms retries bridge the gap until the output is inactive, still within the same timeout. test/cmocka/test_recording_shutdown_inactive.cpp covers the early-deactivate and never-inactive cases, and the original wait test is unchanged. #1643 later tightened the deactivation race.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions