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

[macOS] Iconified NSWindow is not release/closed properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 5.13
    • 5.9.6
    • GUI: Window management
    • None
    • Mac OS 10.13.6.
      QTBUG-67202 is verified as being OK on 10.12, but showing on 10.13.6
    • macOS
    • e7e8b027285f2bbc2c8a698095865c2608dd0204

    Description

      Create an application with windows. Hide the application, then arrange for the windows to be killed (that is, call deleteLater() on the top-level QWidget). Now make the application visible again. The windows are still there, but without any content.

      I will shortly attach a simple project that makes an application to help you reproduce the problem. When you run the application, a window appears with two buttons- Make Window and Kill Them. Click the Make Windows button and two window appears with a button in each (that's so you can see if there is content in the windows). Now click Kill Them; after a five-second delay the windows disappear and qDebug() prints messages in the Creator console:
      {{
      onKillTimeout()
      Destroyed signal for "Window 1"
      Destroyed signal for "Window 2"
      }}

      Click Make Windows again, and then click Kill Them. Hide the application (press Cmd-H, or select Hide KillWindowsWhenHidden from the application menu. Wait five seconds or until you see the debug lines appear in the Creator console. Now show the application (you can click its icon in the Dock).

      What you see is that the windows are still there, but without any content. It appears that all the Qt-ness of the windows has been removed leaving behind a raw NSWindow.

      I think this is related to QTBUG-67202.

      I traced into QCocoaWindow::~QCocoaWindow(). These lines are executed in both cases:
      {{
      [m_view release];
      [m_nsWindow release];
      [m_windowCursor release];
      }}
      Perhaps the NSWindow is over-retained? Someone somewhere is failing to release if the window/application is hidden?

      Attachments

        Issue Links

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

          Activity

            People

              tpochep Timur Pocheptsov
              johnweeks John Weeks
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes