Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-33495

Assert sometimes triggers in deviceshell

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P1: Critical P1: Critical
    • None
    • Qt Creator 18.0.0-beta1 (18.0 branch)
    • Remote Linux
    • None

      I current get the following assert relatively often:

      QTC_ASSERT(pidEnd != -1 && typeEnd != -1, continue);
      

      in parseShellOutput in deviceshell.cpp.

      The contents of "data" is "rm is /usr/bin/rm
      1:O:TGludXgK
      1:R:MAo=
      "
      .

      When looking at the code I wonder a bit about the combination of the general

                      connect(m_shellProcess.get(),
                              &Process::readyReadStandardOutput,
                              m_shellProcess.get(),
                              [this] { onReadyRead(); });
      

      after starting the m_shellProcess, and the

          m_shellProcess->writeRaw(checkCmd);
          if (!m_shellProcess->waitForReadyRead()) {
      ...
          }
          QByteArray out = m_shellProcess->readAllRawStandardOutput();
      

      in DeviceShell::checkCommand.

      "waitForReadyRead()" doesn't need to mean that all of the output that is lined up for the result of checkCmd is ready to be received. For

      checkCommand("mktemp");
      checkCommand("rm");
      

      the first readAllRawStandardOutput for "mktemp" could return "mktemp is /us"
      and the second readAllRawStandardOutput for "rm" could return "r/bin/mktemp\n"
      and leave the "rm is /usr/bin/rm" to be read by the general onReadyRead, leading to this error.

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

            madwinter Marcus Tillmanns
            con Eike Ziller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes