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

QWindow::visibilityChanged emission during destruction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: P1: Critical P1: Critical
    • None
    • 6.6, dev
    • GUI: Window management
    • None
    • All

      During destruction of QWindows there's an unexpected QWindow::visibilityChanged emission which can cause crashes when a slot was connected that uses the window.

       

      I'm attaching an example that is close to what we are seeing in KDE Plasma. We have a derived class of QWindow + some code that connects to visibilityChanged and then touches internals of the derived class. Due to the signal during destruction this leads to accessing already freed resources (the one of the derived class) and ultimately segfaults.

        1. qwindowsignal.tar
          10 kB
          Harald Sitter
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vestbo Tor Arne Vestbø
            apachelogger Harald Sitter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes