Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-136165

OBS Studio flashing/hanging due to changed window focus behavior

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.8.0, 6.8.1, 6.8.2, 6.8.3
    • GUI: Window management
    • None
    • OBS Studio on Windows. A build from master branch is currently needed because there is no tagged OBS Studio release with Qt 6.8.2.
    • Windows
    • Windows

    Description

      OBS Studio has migrated from Qt 6.6.3 to 6.8.2. OBS builds with 6.8.2 are not released yet.

      OBS Studio uses several browser docks, which are Qt dock widgets that contain a browser instance, specifically from CEF (Chromium Embedded Framework). During startup of OBS, `restoreState()` is used, and this has been working fine until updating to Qt 6.8.2. Specifically, once several browser docks are restored, with one of them in the docked state of the main window, all Qt windows begin rapidly flashing and eventually the app hangs. Task Manager must be used to kill the process.

      Attempting to debug the app is difficult because the debugger is also frozen and cannot interrupt the loop. Profiling reveals that `QApplication::notify()` is being called in a tight loop. Breaking this loop sometimes occurs by quickly clicking each window (or dock) after application start, thereby providing a focus() event for each widget.

      After tedious iteration and testing, the commit that introduced this behavior is in Qt base: https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f20be43b827ffa5c9361bc128fd930841435bdf6

      Please note this issue was found on Windows, but very likely exists for Linux and Mac as well (OBS Studio runs on all 3).

      Attachments

        1. 2025-05-12 18-02-48.mp4
          284 kB
        2. obs-bug.mp4
          14.17 MB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              dorisverria Doris Verria
              lexano-ivs Alex Luccisano
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes