Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1253

Calling QMetaObject.invokeMethod with BlockingQueuedConnection freezes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.14.2
    • PySide
    • None
    • Linux/X11, macOS, Windows
    • 11126a9811b21886acdac1e484a92044d7ffd5a2 (pyside/pyside-setup/5.14)

    Description

      Our builds on Azure Pipeline picked up the latest version of PySide2 5.14.2 and all froze when invoking QMetaObject.invokeMethod with BlockingQueuedConnection.  Locking the version to 5.14.1 unlocked all our builds (Python 2 and 3 on macOS/Linux and Python 3 on Windows)

      This also freezes locally on my computer (macOS 10.14) 

      Here's a code snippet to reproduce the issue.

      from PySide2 import QtWidgets, QtCore
      app = QtWidgets.QApplication([])
      
      class Thread(QtCore.QThread):
          def run(self):
              QtCore.QMetaObject.invokeMethod(
                 self, "invoked_from_main_thread", QtCore.Qt.BlockingQueuedConnection
              )
      
          @QtCore.Slot()
          def invoked_from_main_thread(self):
              # We never get here in PySide2 5.14.2.
              print("Inside invoked_from_main_thread.")
              app.quit()
      
      t = Thread()
      t.start()
      
      app.exec_()
      

      Attachments

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              jfboismenu JF Boismenu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes