bugGNU Octave - Bugs: bug #50801, Qt toolkit segmentation fault when...

 
 

bug #50801: Qt toolkit segmentation fault when figure+uicontrol created with string and deleted

Submitter:  -X- <jsh>
Submitted:  Fri 14 Apr 2017 01:01:47 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 10 Nov 2018 03:40:27 PM UTC, comment #4: 

No response.  Closing report.

Rik <rik5>
Group administrator
Fri 02 Nov 2018 07:43:02 PM UTC, comment #3: 

Is this still an issue?  There has been a lot of work on callbacks, the delete function, and uicontrol lately.

I didn't have a problem when I tried the sample code with today's tip


parent: 26013:1d366a105f18 tip
 Remove unnecessary static deprecated functions in graphics.cc.



Rik <rik5>
Group administrator
Sun 16 Apr 2017 01:56:53 AM UTC, comment #2: 

I'm testing in a VirtualBox LinuxVM with software rendering, so although I have integrated intel graphics I'm not sure if it applies in my case. Although, I certainly don't grasp Qt or OpenGL to understand this fully it still seems to me that the Qt threads run out of sync with the Octave internal handles somehow. @Dmitri Could it possibly be that the discrete graphics are so much faster that you don't see a bug with them?

Here is also my backtrace though:

octave:3> f = figure; c = uicontrol( 'parent', f, 'string', 'button' ); delete(c), delete(f)
octave:4> warning: base_graphics_object::get_properties: invalid graphics object
terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast

Program received signal SIGABRT, Aborted.
0x00007ffff4d83c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0  0x00007ffff4d83c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff4d87028 in __GI_abort () at abort.c:89
#2  0x00007ffff5388535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff53866d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff5386703 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff5386976 in __cxa_rethrow () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff36eb596 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007ffff36f0b79 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007ffff7a33472 in octave::gui_application::execute (this=this@entry=0x7fffffffdad0)
    at libgui/src/octave-gui.cc:248
#9  0x0000000000401032 in main (argc=2, argv=0x7fffffffdcd8) at src/main-gui.cc:104

-X- <jsh>
Sat 15 Apr 2017 04:51:07 AM UTC, comment #1: 

At this moment I am pretty much convinced that the issue is a buggy implementation of OpenGL for the integrated Intel's graphics. Not sure if it is CPU, M/B, or just software.
I cannot reproduce this on any other computer with a discrete graphics (I tried 4 -- one with Nvidia, the rest AMD's).

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Fri 14 Apr 2017 01:01:47 AM UTC, original submission:  

This was reported in bug #44330 but since that bug is closed and possibly fixed I'm opening a new one for this, since it might only be partially related (and possibly important since any complex user built Gui will eventually crash due to this):

The sequence


f = figure; c = uicontrol( 'parent', f, 'string', 'button' ); delete(c), delete(f)


eventually crashes Octave on Linux and freezes on Windows 10. The string property seems to be critical as without it everything seems to be working fine. Dimitri has verified the bug #44330 comments #24-#27 and includes the following backtrace:

#0 0x00007fffeb27f7bb in raise () at /lib64/libc.so.6
#1 0x00007fffeb2815d1 in abort () at /lib64/libc.so.6
#2 0x00007fffebae2fc5 in __gnu_cxx::__verbose_terminate_handler() () at /lib64/libstdc++.so.6
#3 0x00007fffebae0bb6 in () at /lib64/libstdc++.so.6
#4 0x00007fffebadfab9 in () at /lib64/libstdc++.so.6
#5 0x00007fffebae04a8 in __gxx_personality_v0 () at /lib64/libstdc++.so.6
#6 0x00007fffeb8480e3 in () at /lib64/libgcc_s.so.1
#7 0x00007fffeb84890e in _Unwind_Resume () at /lib64/libgcc_s.so.1
#8 0x00007ffff517a525 in QObjectPrivate::setParent_helper(QObject*) () at /lib64/libQt5Core.so.5
#9 0x00007ffff517a996 in QObject::~QObject() () at /lib64/libQt5Core.so.5
#10 0x00007ffff59e166c in QWidget::~QWidget() () at /lib64/libQt5Widgets.so.5
#11 0x00007ffff5b1e6d9 in QPushButton::~QPushButton() () at /lib64/libQt5Widgets.so.5
#12 0x00007ffff7a53cb2 in QtHandles::Object::finalize() (this=0xa60220) at ../libgui/graphics/Object.cc:140
#13 0x00007ffff7a53a79 in QtHandles::Object::slotFinalize() (this=0xa60220) at ../libgui/graphics/Object.cc:110
#14 0x00007ffff7a11817 in QtHandles::Object::qt_static_metacall(QObject, QMetaObject::Call, int, void*) (_o=0xa60220, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffb44ee780) at libgui/graphics/moc-Object.cc:93
#15 0x00007ffff5174199 in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#16 0x00007ffff599ed9c in QApplicationPrivate::notify_helper(QObject, QEvent) () at /lib64/libQt5Widgets.so.5
#17 0x00007ffff59a63d4 in QApplication::notify(QObject, QEvent) () at /lib64/libQt5Widgets.so.5
#18 0x00007ffff514bb8b in QCoreApplication::notifyInternal2(QObject, QEvent) () at /lib64/libQt5Core.so.5
#19 0x00007ffff514dd6b in QCoreApplicationPrivate::sendPostedEvents(QObject, int, QThreadData) () at /lib64/libQt5Core.so.5
#20 0x00007ffff519ac73 in postEventSourceDispatch(_GSource, int ()(void), void) () at /lib64/libQt5Core.so.5
#21 0x00007fffe7ac31d7 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#22 0x00007fffe7ac3578 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#23 0x00007fffe7ac360c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#24 0x00007ffff519acef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#25 0x00007ffff514ab8a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#26 0x00007ffff51527dc in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#27 0x00007ffff798e66f in octave::gui_application::execute() (this=0x7fffffffc358) at ../libgui/src/octave-gui.cc:248
#28 0x00000000004016e1 in main(int, char**) (argc=9, argv=0x7fffffffc5f8) at ../src/main-gui.cc:104

-X- <jsh>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by jsh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-11-10 rik5 Open/ClosedOpen Closed
    2018-11-02 rik5 StatusNone Need Info
    2018-11-02 pantxo CategoryGUI Plotting with OpenGL
    2017-04-14 rik5 Carbon-CopyRemoved 72865 -
    2017-04-14 rik5 SummaryQt toolkit segmentation fault when figure+uicontrol created with string and delted Qt toolkit segmentation fault when figure+uicontrol created with string and deleted

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code