Summary: | Crash in BreakpointModel::breakpoint() 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/79c2b0f65c258cb0d931f55aa417bb5cb8714ca1 | Version Fixed In: | 5.6.1 |
Description
Igor Kushnir
2020-08-30 15:44:35 UTC
Git commit 79c2b0f65c258cb0d931f55aa417bb5cb8714ca1 by Igor Kushnir. Committed on 15/10/2020 at 15:26. Pushed by igorkushnir into branch '5.6'. MIDebugger: check ICore::debugController() for nullptr When a user exits KDevelop while debugging a program, a queued call to MIDebugger::readyReadStandardOutput() may be invoked during or after ~CorePrivate(). If this happens after ~DebugController() (which is the parent of BreakpointModel), a crash is likely, because readyReadStandardOutput() indirectly calls MIBreakpointController::updateFromDebugger(), which assumes that BreakpointModel is not null (as do all other MIBreakpointController's member functions). Note that MIDebugger::readyReadStandardOutput() after ~DebugController() can be invoked both from inside ~MIDebugger() (more precisely, from inside the QProcess::waitForFinished() call) and before the destructor. There is no need to process a debugger's standard output and risk a crash when KDevelop has almost finished shutting down. FIXED-IN: 5.6.1 M +10 -0 plugins/debuggercommon/midebugger.cpp https://invent.kde.org/kdevelop/kdevelop/commit/79c2b0f65c258cb0d931f55aa417bb5cb8714ca1 |