Summary: | Crash in BreakpointModel::updateState() when exiting KDevelop while debugging a program | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Igor Kushnir <igorkuo> |
Component: | CPP Debugger | Assignee: | Igor Kushnir <igorkuo> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | niko.sams |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/kdevelop/kdevelop/commit/37ff587ebe2a2c355d71cb583fb5f058c5301ff3 | Version Fixed In: | 5.7.0 |
Description
Igor Kushnir
2020-08-30 15:34:13 UTC
Git commit 37ff587ebe2a2c355d71cb583fb5f058c5301ff3 by Igor Kushnir. Committed on 15/10/2020 at 15:26. Pushed by igorkushnir into branch '5.6'. Safely finalize and destroy DebugSession objects DebugController is responsible for destroying debug sessions and it can not do so past its own destructor. Currently, depending on the relative timing of KDevelop exit and the 5 second interval of the singleshot timer in MIDebugSession::stopDebugger(), a DebugSession may be destroyed safely in time or not destroyed at all and possibly cause a crash by accessing the already destroyed DebugController or its children. Let us kill debugger processes and thus finalize the debug sessions' states in ~DebugController(). We delay the killing of debugger processes for as long as possible to give them a chance to exit on their own. Check ICore::documentController() for nullptr in BreakpointModel::updateMarks() and DebugController::clearExecutionPoint() to prevent crashes when these slots are invoked by DebugSession's state transition signals from inside ~DebugController(), which is called after ~DocumentController(). FIXED-IN: 5.6.1 M +9 -2 kdevplatform/debugger/breakpoint/breakpointmodel.cpp M +2 -0 kdevplatform/debugger/interfaces/idebugsession.h M +20 -2 kdevplatform/shell/debugcontroller.cpp M +1 -0 kdevplatform/shell/debugcontroller.h M +5 -0 kdevplatform/tests/testdebugsession.cpp M +1 -0 kdevplatform/tests/testdebugsession.h M +17 -3 plugins/debuggercommon/midebugsession.cpp M +4 -0 plugins/debuggercommon/midebugsession.h https://invent.kde.org/kdevelop/kdevelop/commit/37ff587ebe2a2c355d71cb583fb5f058c5301ff3 Had to revert the fix in the stable 5.6 branch, because it broke the ABI. The commit is restored in the master branch, so I set Version Fixed In to 5.7.0. |