Skip to content

bug: macOS: Qt focus events hang in synchronous IconServices lookup #725

Closed

Description

@zackees

Context

Final validation for #635 repeatedly hangs the Intel macOS frontend. This blocks complete release validation while #627's Windows x64/ARM64 startup, module and missing-plugin/runtime checks pass.

Exact source 3b808982eb34a6a035242f06e494fe50cfd74d1e, run 38556183769:

  • Attempt 1: native Intel job 115835640525 times out on shutdown after three config modes passed. Owned PID29195 was sampled for five seconds before cleanup.
  • One unchanged retry on a fresh hosted runner also fails: job 115840398922, owned PID9704, same Qt/Apple icon path. No timeout or assertion was relaxed.
  • Both samples place the main thread in Qt6.11.1 Cocoa focus handling, then NSWorkspace iconForContentType, IconServices initialization and a synchronous XPC reply wait. Other OBS threads continue running; the main thread is not in OBS shutdown code.
  • Qt6.11.1 QCocoaIntegration::focusWindowChanged synchronously obtains a generic application icon before checking whether an explicit application icon already exists.
  • frontend/OBSApp.cpp excludes macOS from its Qt application-icon initialization. macOS already supplies a packaged bundle icon, so this generic-icon comparison should not be necessary for our frontend.

This also explains the shape of the earlier intermittent Intel timeout recorded in #706; that run had no sample, so it is not asserted to have the same cause.

Proposal

Prevent unnecessary synchronous generic-icon lookup during focus changes when this application supplies its own icon. Prefer a supported Qt approach; if the dependency's implementation requires a narrowly scoped adapter, isolate it in the existing macOS platform utility and document the Qt boundary. Preserve the application icon, focus signals, menus and normal window behavior.

Acceptance criteria

  1. RED: reproduce the unwanted generic-icon lookup/focus hookup in a focused test before implementing a change, retaining both actual failed native runs as runtime evidence.
  2. GREEN: the focused regression passes with the scoped implementation.
  3. Actual Intel and ARM macOS packages pass all fresh/default-import/custom-import/existing-profile startup and shutdown checks with the same deadlines. Keep the saved capture sources, protocol and screenshots.
  4. Test that unrelated focus/menu handling is preserved; do not disable all focus signals, force offscreen/minimal Qt, skip modes, increase deadlines or retry until a pass.
  5. Fresh gates, review and merge-queue CI pass; revalidate the complete Release retrospective: daily betas 2026-10-11 to 2026-10-13 #635 candidate before claiming completion.

Decisions

  • Treat this as a release blocker because it reproduced on two fresh native jobs and prevents the current complete release gate.
  • Keep windows: The release never checks that the packaged zip starts #627's Windows changes separate: the Mac stack is in unchanged Qt/Apple code, and the requested Windows mutations already pass.
  • Do not claim an OBS shutdown deadlock or an Apple-service repair: the captured stack proves a synchronous icon-service wait, not why the remote service stopped replying.

Open questions

  • Which supported application-side Qt facility can avoid this particular icon callback without changing unrelated platform behavior?
  • Whether an upstream Qt fix is available; no dependency version or private ABI workaround is assumed yet.

Related: #635, #627, #706.

Activity

  1. zackees commented on Oct 14, 2026

    @zackees
    MemberAuthor

    Claiming: the reproduced Intel Mac icon-service startup/shutdown blocker. 1. Characterize the Qt focus/icon boundary with a focused RED test and both saved native samples. 2. Implement a scoped macOS prevention that preserves icon/focus/menu behavior, without weakening the package harness. 3. Run fresh gates, review and both actual Mac architectures, then merge via the queue and resume complete #635 validation. First draft expected today.

  2. added
    claimed
    on Oct 14, 2026
  3. removed
    claimed
    on Oct 14, 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