Avoid octave backend crushing, when we try to kill ended process
ClosedPublic

Authored by sirgienko on Apr 27 2018, 9:01 PM.

Details

Summary

Now octave backend don't crash, but we still need to interrupt quit entry and restart backend.
BUG: 372074
FIXED-IN: 18.04.1

Diff Detail

Repository
R55 Cantor
Branch
fix-bug-372074
Lint
No Linters Available
Unit
No Unit Test Coverage
sirgienko created this revision.Apr 27 2018, 9:01 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptApr 27 2018, 9:01 PM
Restricted Application added a subscriber: KDE Edu. · View Herald Transcript
sirgienko requested review of this revision.EditedApr 27 2018, 9:01 PM

@asemke, which version I should set in FIXED-IN?
I think 18.04.1, am I right?

Shouldn't this check if(m_process->state() != QProcess::NotRunning) be done in a central place so that this logic applies for all backends? It shoudln't be possible to call the interrupt action in worksheet or in cantor_shell/part at all if the process is not running. But we can maybe also safe-guard this in all the *session.cpp files.

calling quit() in an octave session results in a permanent "Calculating..." message in the status bar. Clicking on the interrupt crashes cantor. This problem is a bit similar to https://bugs.kde.org/show_bug.cgi?id=372075.

Shouldn't this check if(m_process->state() != QProcess::NotRunning) be done in a central place so that this logic applies for all backends? It shoudln't be possible to call the interrupt action in worksheet or in cantor_shell/part at all if the process is not running. But we can maybe also safe-guard this in all the *session.cpp files.

I have checked all session files, and all the files, except octavesession.cpp, or have has existence checking before kill the process or even haven't killed the process.

calling quit() in an octave session results in a permanent "Calculating..." message in the status bar. Clicking on the interrupt crashes cantor. This problem is a bit similar to https://bugs.kde.org/show_bug.cgi?id=372075.

It look similar, but I don't think, that they have same reason. Python2 doesn't use process, it uses python binding for c++. And I think, the problem, that we run python command without checking python status, so then the problem arise, when we run print(quit()) after quit().

@asemke, which version I should set in FIXED-IN?
I think 18.04.1, am I right?

yes, we'll cherry-pick the fixes to the branch for the patch release.

Shouldn't this check if(m_process->state() != QProcess::NotRunning) be done in a central place so that this logic applies for all backends? It shoudln't be possible to call the interrupt action in worksheet or in cantor_shell/part at all if the process is not running. But we can maybe also safe-guard this in all the *session.cpp files.

I have checked all session files, and all the files, except octavesession.cpp, or have has existence checking before kill the process or even haven't killed the process.

I don't see such a check in maximasessin.cpp. But ok, let's safe-guard everywhere.

asemke accepted this revision.Apr 28 2018, 7:02 PM
This revision is now accepted and ready to land.Apr 28 2018, 7:02 PM
sirgienko edited the summary of this revision. (Show Details)Apr 28 2018, 8:17 PM
sirgienko closed this revision.Apr 28 2018, 8:19 PM