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

QProcessManager deadlocks if created in an auxiliary thread and the main thread is blocked

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.0.0 Beta 2
    • 5.0.0
    • Core: I/O
    • None
    • Ubuntu 12.04, 64 bit
    • 24a231d7a3f54a4a3ac23aed4759bb9b7556c15f

      Consider this simple piece of code:

      void func()
      {
          QProcess().execute("ls");
      }
      
      int main(int argc, char *argv[])
      {
          QCoreApplication app(argc, argv);
          QtConcurrent::run(func).waitForFinished();
      }
      

      With Qt 5 (last qtbase commit: 83b1ed1ea8168e3de15de7a8a44a5224db5a2284), this application hangs indefinitely in the execute() call. Calling start() and then waitForStarted() shows the same behavior.
      The same code works fine with 4.8. It also works fine if you do not create a QCoreApplication object.

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

            thiago Thiago Macieira
            kandeler Christian Kandeler
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes