-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
Qt Creator 18.0.0-beta1 (18.0 branch)
-
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.