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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.2.0 Beta1
    • Component/s: Core: I/O
    • Labels:
      None
    • Commits:
      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

              Assignee:
              jbornema Joerg Bornemann
              Reporter:
              philippe Philippe Goutier
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes