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

Windows: QProcess::waitForFinished / QProcessPrivate::drainOutputPipes crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.2.0 Beta1
    • 5.1.1
    • Core: I/O
    • None
    • 8dc8fe53f9b27a27230945a98b08570cfc1b4d0f

    Description

      What happen is this:
      while this line is executed (in qprocess_win.cpp / QProcessPrivate::drainOutputPipes)

      readyReadEmitted |= stdoutReader->waitForReadyRead(0);

      much stuff is being executed (espesically QProcessPrivate::destroyChannel is called) and stdoutReader becomes 0,
      hence the line following causes a crash (in QProcessPrivate::drainOutputPipes):

      readOperationActive = stdoutReader->isReadOperationActive();

      I fix the problem by simply testing
      if (stdoutReader) again
      and further if (stderrReader)

      Note: my code was not revealling this problem with Qt 4.8.5

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              jirauser26727 user-04d21 (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes