From 147add2ed8b3eac24b6bbd1af818f4685ab2aced Mon Sep 17 00:00:00 2001 From: Igor Kushnir Date: Tue, 22 Sep 2020 13:31:45 +0300 Subject: [PATCH] Don't crash after Cancel in Job Already Running dialog When a user Execute-Launches an application a second time while the previously launched instance of this application is still running, the "Job Already Running" dialog appears with 3 buttons. If a user clicks the Cancel button, a NativeAppJob kills itself Quietly. This NativeAppJob belongs to an ExecuteCompositeJob, which is not notified when a subjob is killed Quietly. So the ExecuteCompositeJob keeps waiting for it to finish. When this waiting ExecuteCompositeJob is killed (e.g. via "Stop All" button or on KDevelop exit), it attempts to kill the subjob it believes is still running, but which in fact is long since destroyed. This usually causes a segmentation fault. Aleix Pol fixed a similar crash when the "Kill All Instances" button in the "Job Already Running" dialog is clicked in 8430d3058f92725b4e6b7d85d8d68550ce12ee79. BUG: 399511, 416874 FIXED-IN: 5.6.1 --- plugins/execute/nativeappjob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/execute/nativeappjob.cpp b/plugins/execute/nativeappjob.cpp index 56d0443055..48adf72136 100644 --- a/plugins/execute/nativeappjob.cpp +++ b/plugins/execute/nativeappjob.cpp @@ -176,7 +176,7 @@ void NativeAppJob::start() } break; default: // cancel starting a new job - kill(); + kill(EmitResult); return; } } -- GitLab