From 531e24892bae6a931341a87ad7b40541107854bd Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 17 Feb 2022 11:58:08 +0100 Subject: [PATCH] Fix starting remote process in terminal SshDeviceProcess::start() is overridden and it starts connecting phase. It marks the current state as Starting. Later, when connection is being established, it calls back the base QtcProcess::start() and it fails on assert. This doesn't happen when starting not in terminal, as in this case SshDeviceProcess delegates the start to the aggregated SshRemoteProcess instead of calling QtcProcess::start(). Disabling the assert for a while, until we de-virtualize the public interface back again, as from the public API side it's still a valid assert. Change-Id: I0d62ec0db778f68fcc5afa4a6f08d54f98d74e4f Reviewed-by: hjk --- src/libs/utils/qtcprocess.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp index a5aa6fefd53..de30b3d7106 100644 --- a/src/libs/utils/qtcprocess.cpp +++ b/src/libs/utils/qtcprocess.cpp @@ -774,7 +774,8 @@ void QtcProcess::setUseCtrlCStub(bool enabled) void QtcProcess::start() { - QTC_ASSERT(state() == QProcess::NotRunning, return); +// TODO: Uncomment when we de-virtualize start() +// QTC_ASSERT(state() == QProcess::NotRunning, return); if (d->m_setup.m_commandLine.executable().needsDevice()) { QTC_ASSERT(s_deviceHooks.startProcessHook, return);