bugGNU Octave - Bugs: bug #60500, GUI crashes on exit


bug #60500: GUI crashes on exit

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Sun 02 May 2021 04:33:29 PM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Sat 08 May 2021 08:38:34 AM UTC, comment #6: 

I was able to more or less reliably reproduce the crash here.
After your change, I'm no longer seeing those crashes on exiting the GUI.

Closing as fixed.

Markus Mützel <mmuetzel>
Project Member
Sat 08 May 2021 01:28:02 AM UTC, comment #5: 

I pushed the following changeset:


It seems to avoid the problem for me.  Does it work for you or do you still see the crash?

John W. Eaton <jwe>
Project Administrator
Mon 03 May 2021 01:55:20 PM UTC, comment #4: 

OK, I am sometimes seeing this crash now but it does not appear to be 100% reproducible for me.  I'm doing some more work on signal/slot connections in the GUI, so I'll see if I can figure out what is causing the trouble.

John W. Eaton <jwe>
Project Administrator
Mon 03 May 2021 06:30:46 AM UTC, comment #3: 

@jwe: Yes, there are open files in the editor when Octave crashes on exit. I also have the option "Restore editor tabs from previous sessions..." selected in the preferences if that is important.

Markus Mützel <mmuetzel>
Project Member
Sun 02 May 2021 09:29:21 PM UTC, comment #2: 

Are any files open in editor tabs when you are exiting Octave?

John W. Eaton <jwe>
Project Administrator
Sun 02 May 2021 05:48:19 PM UTC, comment #1: 

Seems to work fine of Fedora 34 (hg id 0023c109e1b0)


Dmitri A. Sergatskov <dasergatskov>
Sun 02 May 2021 04:33:29 PM UTC, original submission:  

With a build from the current development branch (hg id b4cb9d04f3cf), Octave crashes on exit for me on Ubuntu 20.10.

gdb backtrace of the segfault:

Thread 1 "octave-gui" received signal SIGSEGV, Segmentation fault.
0x00007ffff466fcb2 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
(gdb) bt
#0  0x00007ffff466fcb2 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#1  0x00007ffff4653880 in QWidget::clearFocus() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#2  0x00007ffff4654948 in QWidget::~QWidget() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3  0x00007ffff47c532d in QStatusBar::~QStatusBar() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4  0x00007ffff3b8a18e in QObjectPrivate::deleteChildren() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff4654a66 in QWidget::~QWidget() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ffff7d83f1d in octave::file_editor_tab::~file_editor_tab() (this=0x5555575cd4e0, __in_chrg=<optimized out>)
    at ../libgui/src/m-editor/file-editor-tab.cc:275
#7  0x00007ffff7d93cdf in octave::file_editor::handle_tab_ready_to_close() (this=0x555555fa5be0)
    at ../libgui/src/m-editor/file-editor.cc:531
#8  0x00007ffff3b962e6 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff7d83977 in octave::file_editor_tab::check_file_modified(bool) (this=0x5555575cd4e0, remove=remove@entry=false)
    at ../libgui/src/m-editor/file-editor-tab.cc:1711
#10 0x00007ffff7d93b1d in octave::file_editor::check_closing() (this=0x555555fa5be0) at ../libgui/src/m-editor/file-editor.cc:491
#11 0x00007ffff7dc663d in octave::qt_interpreter_events::confirm_shutdown_octave() (this=0x5555558446d0)
    at ../libgui/src/qt-interpreter-events.cc:632
#12 0x00007ffff3b8c651 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff4618013 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff7dc3b7b in octave::octave_qapplication::notify(QObject*, QEvent*)
    (this=0x5555556763a0, receiver=<optimized out>, ev=<optimized out>) at ../libgui/src/octave-qobject.cc:133
#15 0x00007ffff3b601ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff3b62bc1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff3bb81c7 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff11d262b in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff11d28d8 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff11d29a3 in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff3bb7843 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007ffff3b5ea4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff3b66fc6 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
--Type <RET> for more, q to quit, c to continue without paging--c
#24 0x00007ffff7dc3643 in octave::base_qobject::exec() (this=this@entry=0x7fffffffb7d0) at ../libgui/src/octave-qobject.cc:327
#25 0x00007ffff7dce7a1 in octave::qt_application::execute() (this=0x7fffffffb9d0) at ../libgui/src/qt-application.cc:73
#26 0x0000555555556531 in main(int, char**) (argc=9, argv=0x7fffffffbd08) at ../src/main-gui.cc:131

Just opening and closing the GUI is sufficient to trigger the crash for me.

The output of "thread apply all bt" is attached.

Markus Mützel <mmuetzel>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #51359:  gdb_thread_all.txt added by mmuetzel (22KiB - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-08 mmuetzel StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2021-05-08 jwe StatusNeed Info => Ready For Test
    2021-05-03 rik5 Carbon-CopyRemoved 72865 => -
    2021-05-03 rik5 StatusNone => Need Info
    2021-05-02 mmuetzel Attached File- => Added gdb_thread_all.txt, #51359

    Back to the top

    Powered by Savane 3.7