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

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes