Skip to content

frontend: free-disk-space checks run on the UI thread and can freeze on a hung network path #1282

Closed

Description

@zackees

Part of #1273. B, UI thread, can stall.

Free-disk-space checks run on the UI thread:

  • frontend/widgets/OBSBasic_Recording.cpp.hpp:168: a 1 s timer while recording → CheckDiskSpaceRemaining → os_get_free_disk_space(path) (statvfs / GetDiskFreeSpaceEx).
  • frontend/dialogs/OBSBasicStats.cpp.hpp:312: the same every 2 s while the stats window is visible.

That's cheap on a local disk, but on a recording path on a hung network share or NAS each call can block for seconds and freeze the UI.

Fix: query free space on a worker thread (or the existing stats thread), publish the last value, and have the UI only read it, with a timeout or "unknown" state when a query is still in flight.

Test: with an injected free-space function that blocks, the UI-side tick returns immediately and shows the last known or unknown value.

Activity

  1. zackees commented on Oct 17, 2026

    @zackees
    MemberAuthor

    Claiming. Plan: query free disk space off the UI thread (a worker that publishes the last value with its time), and have the recording timer and the stats window only read the cached value, showing unknown while no fresh value exists. RED: with an injected free-space function that blocks, the UI-side tick must return immediately.

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

    @zackees
    MemberAuthor

    Fixed by #1336 (merged). That PR used Refs, so the issue stayed open, but its body lists no remaining work.

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