Sat 02 Sep 2017 04:02:30 AM UTC, comment #4:
I'm referencing previous work on the exit sequence:
https://savannah.gnu.org/bugs/?44485
I believe I tried something similar to what is done here, i.e., terminate and wait, but that wasn't quite right. Octave core wasn't exiting properly and would cause an error message at the command line at exit...and wait() had some issues too, but I can't remember them right now. One thing was as pointed out in the patch:
The way I had approached this is to start a Qt timer and connect it to the signal expected to come from Octave core. If that signal didn't arrive by time the timer expired, then it would toss up a dialog and ask if the thread should be terminated. It's tricky in the sense that the signal could arrive while the dialog box is up. Or the user could impatiently press "exit" multiple times, so we had to make sure to not put up multiple dialog boxes to confirm forced-terminate. It all worked fairly well, but I was never quite happy that every scenario was covered in a robust way so after a few days I decided to let it sit.
Part of the reason I suspended work on that is, if I recall correctly, the Cnrtl-C handling wasn't worked out very well. I thought the Cntrl-C would be the way to break out of a busy Octave core command. At the time, the only way to terminate Octave core was to send an "exit" command. Of course, if Octave is busy processing, it may be a long time, if ever, before the process finishes and the "exit" is handled. So, I guess I was waiting to see how the SIGABRT evolved before putting a close-but-not-quite exit routine in the GUI.
|
Thu 16 Mar 2017 07:09:22 PM UTC, comment #2:
This issue occurs with Qt 5.8.0 because the error message
QThread: Destroyed while thread is still running
is now emitted by qFail() instead of qWarning(). It means that now Qt issues a SIGABRT that is caught by octave.
The following patch works for me:
|
Wed 08 Feb 2017 08:59:00 PM UTC, comment #1:
The error message from Qt appears in the backtrace you attached:
> QThread: Destroyed while thread is still running
This indicates that the main_thread QThread object was destroyed but the thread had not yet exited. A full backtrace of all running threads at the time of the error might be helpful ("thread apply all backtrace" in gdb).
I am unable to reproduce on Debian with Qt 5.7.1
|