[Qt-creator] Crash Qt-creator when stop debugging with bare-metal on Windows

Marcel r00tc0d3 at mienstee.nl
Wed Aug 16 21:21:06 CEST 2017


Hi All,

I filed a bug-18694 <https://bugreports.qt.io/browse/QTCREATORBUG-18694> because qt-creator crashes when I stop debugging using a bare-metal device.

What happens is that in void GdbEngine::interruptInferior() m_signalOperation becomes a null pointer.
See code fragment:

void GdbEngine::interruptInferior()
{
    CHECK_STATE(InferiorStopRequested);

    if (terminal()->sendInterrupt())
        return;

    if (usesExecInterrupt()) {
        runCommand({"-exec-interrupt"});
    } else {
        showStatusMessage(tr("Stop requested..."), 5000);
        showMessage("TRYING TO INTERRUPT INFERIOR");
        if (HostOsInfo::isWindowsHost() && !m_isQnxGdb) {
            QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state(); notifyInferiorStopFailed());
            QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed());
            m_signalOperation = runTool()->device()->signalOperation();
            QTC_ASSERT(m_signalOperation, notifyInferiorStopFailed());
            connect(m_signalOperation.data(), &DeviceProcessSignalOperation::finished,
                    this, &GdbEngine::handleInterruptDeviceInferior);

            m_signalOperation->setDebuggerCommand(runParameters().debugger.executable);
            m_signalOperation->interruptProcess(inferiorPid());
        } else {
            interruptInferior2();
        }
    }
}

I want to help to get to the problem but this is the first time I see qt-creator code. Does any of you have a clue why  runTool()->device()->signalOperation(); returns 0?
What I debugged so far I can see that when start debugging runTool()->device() is not a null pointer.

Some tips and tricks are welcome.

Thanks in advance.

Marcel





 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20170816/f2d8abe6/attachment.html>


More information about the Qt-creator mailing list