octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53342] Segfault in figure with property Integ


From: Guillaume
Subject: [Octave-bug-tracker] [bug #53342] Segfault in figure with property IntegerHandle set to off
Date: Mon, 26 Mar 2018 06:16:55 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #7, bug #53342 (project octave):

Thanks for the feedbacks. First, a perhaps more interesting stack trace:


Thread 1 (Thread 0x7ffff7f9da00 (LWP 26240)):
#0  0x00007fffe65b0f67 in raise () at /lib64/libc.so.6
#1  0x00007fffe65b233a in abort () at /lib64/libc.so.6
#2  0x00007fffe731b2e5 in __gnu_cxx::__verbose_terminate_handler() () at
/usr/lib64/libstdc++.so.6
#3  0x00007fffe73190d6 in  () at /usr/lib64/libstdc++.so.6
#4  0x00007fffe7319121 in  () at /usr/lib64/libstdc++.so.6
#5  0x00007fffe7319363 in  () at /usr/lib64/libstdc++.so.6
#6  0x00007fffe7317fd2 in  () at /usr/lib64/libstdc++.so.6
#7  0x00007ffff49e3bae in QtHandles::Object::properties<figure>()
(this=0x601a0002f240)
    at ../libgui/graphics/Object.h:59
#8  0x00007ffff49dd736 in QtHandles::Figure::update(int) (this=0x601a0002f240,
pId=2037)
    at ../libgui/graphics/Figure.cc:434
#9  0x00007ffff49e0bf7 in QtHandles::Figure::eventNotifyAfter(QObject*,
QEvent*) (this=0x601a0002f240, watched=0x600e000344a0, xevent=0x7fffffffb770)
at ../libgui/graphics/Figure.cc:795
#10 0x00007ffff499d7ce in
QtHandles::GenericEventNotifySender::notifyReceiversAfter(QObject*, QEvent*)
(this=0x600e000344d0, obj=0x600e000344a0, evt=0x7fffffffb770) at
./../libgui/graphics/GenericEventNotify.h:83
#11 0x00007ffff49d62a7 in QtHandles::ContainerBase::event(QEvent*)
(this=0x600e000344a0, evt=0x7fffffffb770)
    at ../libgui/graphics/Container.h:35
#12 0x00007ffff193128c in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff19358ea in QApplication::notify(QObject*, QEvent*) () at
/usr/lib64/libQt5Widgets.so.5
#14 0x00007ffff0c30be5 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib64/libQt5Core.so.5
#15 0x00007ffff19741ed in QWidget::setParent(QWidget*, QFlags<Qt::WindowType>)
() at /usr/lib64/libQt5Widgets.so.5
#16 0x00007ffff197458e in QWidgetPrivate::init(QWidget*,
QFlags<Qt::WindowType>) ()
    at /usr/lib64/libQt5Widgets.so.5
#17 0x00007ffff1a28ccb in
QAbstractButton::QAbstractButton(QAbstractButtonPrivate&, QWidget*) ()
    at /usr/lib64/libQt5Widgets.so.5
#18 0x00007ffff1aba6e5 in QPushButton::QPushButton(QWidget*) () at
/usr/lib64/libQt5Widgets.so.5
#19 0x00007ffff49fa3bb in QtHandles::PushButtonControl::create(graphics_object
const&) (go=...)
    at ../libgui/graphics/PushButtonControl.cc:47
#20 0x00007ffff49f3fdf in QtHandles::ObjectFactory::createObject(double)
(this=0x7ffff4e4afe0 <QtHandles::ObjectFactory::instance()::s_instance>,
handle=-1.3943829269174566) at ../libgui/graphics/ObjectFactory.cc:105
#21 0x00007ffff499f1ac in
QtHandles::ObjectFactory::qt_static_metacall(QObject*, QMetaObject::Call, int,
void**) (_o=0x7ffff4e4afe0 <QtHandles::ObjectFactory::instance()::s_instance>,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x60040027c790) at
libgui/graphics/moc-ObjectFactory.cc:74
#22 0x00007ffff0c5be26 in QObject::event(QEvent*) () at
/usr/lib64/libQt5Core.so.5
#23 0x00007ffff193128c in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () at /usr/lib64/libQt5Widgets.so.5
#24 0x00007ffff19358ea in QApplication::notify(QObject*, QEvent*) () at
/usr/lib64/libQt5Widgets.so.5
#25 0x00007ffff0c30be5 in QCoreApplication::notifyInternal2(QObject*, QEvent*)
() at /usr/lib64/libQt5Core.so.5
#26 0x00007ffff0c329ca in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*) ()
    at /usr/lib64/libQt5Core.so.5
#27 0x00007ffff0c81b03 in  () at /usr/lib64/libQt5Core.so.5
#28 0x00007fffe59a3134 in g_main_context_dispatch () at
/usr/lib64/libglib-2.0.so.0
#29 0x00007fffe59a3388 in  () at /usr/lib64/libglib-2.0.so.0
#30 0x00007fffe59a342c in g_main_context_iteration () at
/usr/lib64/libglib-2.0.so.0
#31 0x00007ffff0c8118c in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /usr/lib64/libQt5Core.so.5
#32 0x00007ffff0c2ebfb in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at
/usr/lib64/libQt5Core.so.5
#33 0x00007ffff0c36ae6 in QCoreApplication::exec() () at
/usr/lib64/libQt5Core.so.5
#34 0x00007ffff48b2dc0 in octave::gui_application::execute()
(this=0x7fffffffc6e0)
    at ../libgui/src/octave-gui.cc:202
#35 0x0000000000401d58 in main(int, char**) (argc=9, argv=0x7fffffffc918) at
../src/main-gui.cc:104


Now, unless there is a simple fix, I wonder if we shouldn't just make the
"IntegerHandle" property read-only, with the only way to define it being
during the construction of the figure, i.e.:


h = figure ("IntegerHandle", "off"); # OK
h = figure; set (h, "IntegerHandle", "off"); # not OK


The situation in which I came across this bug is the following:


h = figure ("IntegerHandle", "off");
hgsave (h, "tmp.fig");
hgload ("tmp.fig")


Interacting with the figure (e.g. a click on "Z+") creates a segfault. The
issue here is with struct2hdl which creates a "naked" figure then adds
properties, one at a time. Passing some or all of the properties when the
figure is constructed would circumvent the bug found here and might anyway be
a necessity as, for example, we will have anyway to do something like this for
other properties such as "Visible" (to prevent a figure flashing when none was
meant to be visible).

In summary, I think the use of the "IntegerHandle" property could be
restricted without much loss of functionality, with struct2hdl modified
accordingly. This would be a departure from Matlab but a small one in my
opinion and this could be revisited when graphics handles as objects are
introduced.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53342>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]