Skip to content

frontend: A failed video init leaks memory and logs nothing that helps diagnose it #633

Closed

Description

@zackees

From the #617 log:

  • Number of memory leaks: 1 after OBSBasic::OBSInit throws on a failed ResetVideo() (OBSBasic.cpp:891-901). Find the allocation with LSan, forcing EGL to fail, and add a regression test.
  • eglGetDisplay failed is logged without eglGetError(), EGL_PLATFORM or WAYLAND_DISPLAY, which is why bug: graphics: video initialization fails on AMD Radeon RX 9060 XT Copy title #617 needed extra rounds of debugging. Log them.
  • Minor: Distribution: "Arch Linux" Unknown, because Arch has no VERSION_ID. Fall back to BUILD_ID/"rolling" (libobs/obs-nix.c:281).

Activity

  1. zackees commented on Oct 13, 2026

    @zackees
    MemberAuthor

    Claiming: #633 failed video initialization cleanup and diagnostic logging.

    1. RED: reproduce the failed ResetVideo path and add a regression check for the leak and EGL failure diagnostics.
    2. GREEN: fix cleanup on video-init failure, add EGL error/environment context, and correct the Arch distribution fallback; validate relevant tests and local gate.
    3. Open a PR against master, with the RED failure and GREEN result documented.
      I expect to open the first PR today.
  2. added
    claimed
    on Oct 13, 2026
  3. zackees commented on Oct 13, 2026

    @zackees
    MemberAuthor

    Progress: the forced-EGL startup regression now passes against a full ASan/LSan frontend build. After releasing the partially initialized window, LSan identified the remaining 64-byte allocation at os_cpu_usage_info_start (platform-nix.c:133) from OBSBasic::OBSBasic (OBSBasic.cpp:353), plus the shortcut event filter. Both are now released; the failing startup logs zero OBS allocations and no frontend startup leak. Six new cmocka checks cover EGL error/environment logging and os-release fallback behavior. Local review is clean; the required OFF/ON gate is running before the PR is pushed.

  4. zackees commented on Oct 13, 2026

    @zackees
    MemberAuthor

    Fixed by #655: failed video initialization releases the partially initialized window, CPU sampler, and shortcut filter; EGL failures include the error and environment; rolling distributions use BUILD_ID/rolling. Full startup ASan/LSan regression and local gates passed, and current-head CI passed across Linux, macOS, and Windows. All requested items are addressed.

  5. removed
    claimed
    on Oct 13, 2026
  6. added 2 commits that reference this issue on Oct 27, 2026
  7. added a commit that references this issue on Oct 30, 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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions