ChimeraTK / QtHardMon

The ChimeraTK Hardware Monitor. A GUI for DeviceAccess, based on Qt.
GNU Lesser General Public License v3.0
2 stars 0 forks source link

Segfault when trying to open an unregistered backend type #1

Open mhier opened 7 years ago

mhier commented 7 years ago

If I try to open a device (through a dmap file) which uses an unregistered backend type (in the specific example this was the case because the plugin specified in the dmap file wasn't found), I get the proper error message in a message box but QtHardMon crashes with a segfault after closing the message box.

mhier commented 7 years ago

Stack trace (commit id 60b67d4a5317c5bac7af926bfb1dab483dee855c):


#1  0x00000000004ab307 in boost::function4<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0x38, 
    a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:769
#2  0x00000000004a9b42 in ChimeraTK::DeviceBackend::getRegisterAccessor<double> (this=0x0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...)
    at /home/mhier/ChimeraTK/install/include/mtca4u/DeviceBackend.h:146
#3  0x00007ffff656c07b in mtca4u::LogicalNameMappingBackend::getRegisterAccessor_impl<double> (this=0xe641e0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...)
    at /home/mhier/ChimeraTK/sources/DeviceAccess/device_backends/src/LogicalNameMappingBackend.cc:119
#4  0x00007ffff657a41e in boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0xe64220, p=0xe641e0, a1=..., a2=0, a3=0, a4=...) at /usr/include/boost/bind/mem_fn_template.hpp:506
#5  0x00007ffff6579a1e in boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> >::operator()<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list4<mtca4u::RegisterPath const&, unsigned long const&, unsigned long const&, mtca4u::AccessModeFlags const&> > (this=0xe64230, f=..., a=...) at /usr/include/boost/bind/bind.hpp:515
#6  0x00007ffff6578a4a in boost::_bi::bind_t<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> > >::operator()<mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>(mtca4u::RegisterPath const&, unsigned long&&, unsigned long&&, mtca4u::AccessModeFlags&&) (this=0xe64220, 
    a1=..., a2=<unknown type in /home/mhier/ChimeraTK/install/lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13f0>, 
    a3=<unknown type in /home/mhier/ChimeraTK/install/lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13f5>, 
    a4=<unknown type in /home/mhier/ChimeraTK/install/lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13fa>) at /usr/include/boost/bind/bind.hpp:957
#7  0x00007ffff6577812 in boost::detail::function::function_obj_invoker4<boost::_bi::bind_t<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> > >, boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::invoke (
    function_obj_ptr=..., a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:138
#8  0x00000000004ab456 in boost::function4<boost::shared_ptr<mtca4u::NDRegisterAccessor<double> >, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0xe64218, 
    a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:773
#9  0x00000000004a9b42 in ChimeraTK::DeviceBackend::getRegisterAccessor<double> (this=0xe641e0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...)
    at /home/mhier/ChimeraTK/install/include/mtca4u/DeviceBackend.h:146
#10 0x00000000004a8128 in mtca4u::Device::getOneDRegisterAccessor<double> (this=0x7fffffffd3f0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...)
    at /home/mhier/ChimeraTK/install/include/mtca4u/Device.h:518
#11 0x00000000004c7f40 in RegisterQTreeItem::RegisterQTreeItem (this=0xf51680, device=..., registerInfo=..., parent=0xa10ed0, propertiesWidgetProvider=...)
    at /home/mhier/ChimeraTK/sources/QtHardMon/src/RegisterQTreeItem.cpp:16
#12 0x000000000046b3c2 in QtHardMon::populateRegisterTree (this=0x7fffffffd190, deviceItem=0x90ff20) at /home/mhier/ChimeraTK/sources/QtHardMon/src/QtHardMon.cpp:974
#13 0x000000000046048b in QtHardMon::deviceSelected (this=0x7fffffffd190, deviceItem=0x90ff20) at /home/mhier/ChimeraTK/sources/QtHardMon/src/QtHardMon.cpp:269
#14 0x00000000004deb7d in QtHardMon::qt_static_metacall (_o=0x7fffffffd190, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffc050) at /home/mhier/ChimeraTK/build/QtHardMon/src/moc_QtHardMon.cxx:86
#15 0x00007ffff6d8ef80 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#16 0x00007ffff784adbb in QListWidget::currentItemChanged(QListWidgetItem*, QListWidgetItem*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#17 0x00007ffff784af39 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#18 0x00007ffff6d8ef80 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#19 0x00007ffff783887a in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#20 0x00007ffff78389ef in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#21 0x00007ffff77e6b7c in QAbstractItemView::mousePressEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007ffff72fe490 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007ffff76c739e in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007ffff77ecd13 in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007ffff6d7aa26 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#26 0x00007ffff72a6fbc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007ffff72ae0d6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007ffff6d7a8bd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#29 0x00007ffff72ad6dd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007ffff732b3f2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007ffff732ac83 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007ffff7354542 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#33 0x00007ffff475d197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007ffff475d3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff475d49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffff6dab21e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#37 0x00007ffff7354616 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#38 0x00007ffff6d7913f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#39 0x00007ffff6d794a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#40 0x00007ffff6d7f469 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#41 0x00000000004585d0 in main (argv=1, args=0x7fffffffd598) at /home/mhier/ChimeraTK/sources/QtHardMon/src/main.cpp:18```
fmakowski commented 7 years ago

I will take care of both #1 and #2 today.

25.09.2017 12:51 PM "Martin Hierholzer" notifications@github.com napisał(a):

Stack trace (commit id 60b67d4 https://github.com/ChimeraTK/QtHardMon/commit/60b67d4a5317c5bac7af926bfb1dab483dee855c ):

0 0x00000000004a518e in boost::function_base::empty (this=0x38) at

/usr/include/boost/function/function_base.hpp:636 #1 0x00000000004ab307 in boost::function4<boost::shared_ptr<mtca4u::NDRegisterAccessor

, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0x38, a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:769 #2 0x00000000004a9b42 in ChimeraTK::DeviceBackend::getRegisterAccessor (this=0x0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...) at /home/mhier/ChimeraTK/install/include/mtca4u/DeviceBackend.h:146

3 0x00007ffff656c07b in mtca4u::LogicalNameMappingBackend::

getRegisterAccessor_impl (this=0xe641e0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...) at /home/mhier/ChimeraTK/sources/DeviceAccess/device_backends/ src/LogicalNameMappingBackend.cc:119 #4 0x00007ffff657a41e in boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0xe64220, p=0xe641e0, a1=..., a2=0, a3=0, a4=...) at /usr/include/boost/bind/mem_fn_template.hpp:506

5 0x00007ffff6579a1e in boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend*>,

boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> ::operator()<boost::shared_ptr<mtca4u::NDRegisterAccessor >, boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list4<mtca4u::RegisterPath const&, unsigned long const&, unsigned long const&, mtca4u::AccessModeFlags const&> > (this=0xe64230, f=..., a=...) at /usr/include/boost/bind/bind.hpp:515

6 0x00007ffff6578a4a in boost::_bi::bind_t<boost::shared_ptr<mtca4u::NDRegisterAccessor

, boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor , mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> > ::operator()<mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>(mtca4u::RegisterPath const&, unsigned long&&, unsigned long&&, mtca4u::AccessModeFlags&&) (this=0xe64220, a1=..., a2=<unknown type in /home/mhier/ChimeraTK/install/ lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13f0>, a3=<unknown type in /home/mhier/ChimeraTK/install/ lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13f5>, a4=<unknown type in /home/mhier/ChimeraTK/install/ lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13fa>) at /usr/include/boost/bind/bind.hpp:957 #7 0x00007ffff6577812 in boost::detail::function::function_objinvoker4<boost:: bi::bind_t<boost::shared_ptr<mtca4u::NDRegisterAccessor >, boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> > >, boost::shared_ptr<mtca4u::NDRegisterAccessor >, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::invoke ( function_obj_ptr=..., a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:138 #8 0x00000000004ab456 in boost::function4<boost::shared_ptr<mtca4u::NDRegisterAccessor , mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0xe64218, a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:773 #9 0x00000000004a9b42 in ChimeraTK::DeviceBackend::getRegisterAccessor (this=0xe641e0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...) at /home/mhier/ChimeraTK/install/ include/mtca4u/DeviceBackend.h:146 #10 0x00000000004a8128 in mtca4u::Device::getOneDRegisterAccessor (this=0x7fffffffd3f0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...) at /home/mhier/ChimeraTK/install/include/mtca4u/Device.h:518 #11 0x00000000004c7f40 in RegisterQTreeItem::RegisterQTreeItem (this=0xf51680, device=..., registerInfo=..., parent=0xa10ed0, propertiesWidgetProvider=...) at /home/mhier/ChimeraTK/sources/ QtHardMon/src/RegisterQTreeItem.cpp:16 #12 0x000000000046b3c2 in QtHardMon::populateRegisterTree (this=0x7fffffffd190, deviceItem=0x90ff20) at /home/mhier/ChimeraTK/sources/ QtHardMon/src/QtHardMon.cpp:974 #13 0x000000000046048b in QtHardMon::deviceSelected (this=0x7fffffffd190, deviceItem=0x90ff20) at /home/mhier/ChimeraTK/sources/QtHardMon/src/QtHardMon.cpp:269 #14 0x00000000004deb7d in QtHardMon::qt_static_metacall (_o=0x7fffffffd190, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffc050) at /home/mhier/ChimeraTK/build/QtHardMon/src/moc_QtHardMon.cxx:86 #15 0x00007ffff6d8ef80 in QMetaObject::activate(QObject, QMetaObject const, int, void*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #16 0x00007ffff784adbb in QListWidget::currentItemChanged(QListWidgetItem, QListWidgetItem*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #17 0x00007ffff784af39 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

18 0x00007ffff6d8ef80 in QMetaObject::activate(QObject*, QMetaObject

const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #19 0x00007ffff783887a in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

20 0x00007ffff78389ef in QItemSelectionModel::setCurrentIndex(QModelIndex

const&, QFlags) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #21 0x00007ffff77e6b7c in QAbstractItemView::mousePressEvent(QMouseEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #22 0x00007ffff72fe490 in QWidget::event(QEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

23 0x00007ffff76c739e in QFrame::event(QEvent*) () from

/usr/lib/x86_64-linux-gnu/libQtGui.so.4 #24 0x00007ffff77ecd13 in QAbstractItemView::viewportEvent(QEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #25 0x00007ffff6d7aa26 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject, QEvent) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #26 0x00007ffff72a6fbc in QApplicationPrivate::notify_helper(QObject, QEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #27 0x00007ffff72ae0d6 in QApplication::notify(QObject, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

28 0x00007ffff6d7a8bd in QCoreApplication::notifyInternal(QObject*,

QEvent) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #29 0x00007ffff72ad6dd in QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget*, QWidget*, QPointer&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #30 0x00007ffff732b3f2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #31 0x00007ffff732ac83 in QApplication::x11ProcessEvent(_XEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

32 0x00007ffff7354542 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

33 0x00007ffff475d197 in g_main_context_dispatch () from

/lib/x86_64-linux-gnu/libglib-2.0.so.0 #34 0x00007ffff475d3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #35 0x00007ffff475d49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

36 0x00007ffff6dab21e in QEventDispatcherGlib::processEvents(QFlags<

QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

37 0x00007ffff7354616 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

38 0x00007ffff6d7913f in QEventLoop::processEvents(QFlags)

() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #39 0x00007ffff6d794a5 in QEventLoop::exec(QFlags) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #40 0x00007ffff6d7f469 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

41 0x00000000004585d0 in main (argv=1, args=0x7fffffffd598) at

/home/mhier/ChimeraTK/sources/QtHardMon/src/main.cpp:18

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ChimeraTK/QtHardMon/issues/1#issuecomment-331845857, or mute the thread https://github.com/notifications/unsubscribe-auth/ACxnUmHj-kFAkkGJt-zwfnWqg0SACV-_ks5sl4XEgaJpZM4PiirM .

mhier commented 7 years ago

Thanks! It's not urgent, I only wanted to write it down so it doesn't get forgotten...

From: "Filip Makowski" notifications@github.com To: "ChimeraTK/QtHardMon" QtHardMon@noreply.github.com Cc: "Martin Hierholzer" martin.hierholzer@desy.de, "Author" author@noreply.github.com Sent: Monday, 25 September, 2017 13:18:13 Subject: Re: [ChimeraTK/QtHardMon] Segfault when trying to open an unregistered backend type (#1)

I will take care of both #1 and #2 today.

25.09.2017 12:51 PM "Martin Hierholzer" notifications@github.com napisał(a):

Stack trace (commit id 60b67d4 https://github.com/ChimeraTK/QtHardMon/commit/60b67d4a5317c5bac7af926bfb1dab483dee855c ):

0 0x00000000004a518e in boost::function_base::empty (this=0x38) at

/usr/include/boost/function/function_base.hpp:636 #1 0x00000000004ab307 in boost::function4<boost::shared_ptr<mtca4u::NDRegisterAccessor

, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0x38, a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:769 #2 0x00000000004a9b42 in ChimeraTK::DeviceBackend::getRegisterAccessor (this=0x0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...) at /home/mhier/ChimeraTK/install/include/mtca4u/DeviceBackend.h:146

3 0x00007ffff656c07b in mtca4u::LogicalNameMappingBackend::

getRegisterAccessor_impl (this=0xe641e0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...) at /home/mhier/ChimeraTK/sources/DeviceAccess/device_backends/ src/LogicalNameMappingBackend.cc:119 #4 0x00007ffff657a41e in boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0xe64220, p=0xe641e0, a1=..., a2=0, a3=0, a4=...) at /usr/include/boost/bind/mem_fn_template.hpp:506

5 0x00007ffff6579a1e in

boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> ::operator()<boost::shared_ptr<mtca4u::NDRegisterAccessor >, boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list4<mtca4u::RegisterPath const&, unsigned long const&, unsigned long const&, mtca4u::AccessModeFlags const&> > (this=0xe64230, f=..., a=...) at /usr/include/boost/bind/bind.hpp:515

6 0x00007ffff6578a4a in

boost::_bi::bind_t<boost::shared_ptr<mtca4u::NDRegisterAccessor , boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor , mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> > ::operator()<mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>(mtca4u::RegisterPath const&, unsigned long&&, unsigned long&&, mtca4u::AccessModeFlags&&) (this=0xe64220, a1=..., a2=<unknown type in /home/mhier/ChimeraTK/install/ lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13f0>, a3=<unknown type in /home/mhier/ChimeraTK/install/ lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13f5>, a4=<unknown type in /home/mhier/ChimeraTK/install/ lib/libmtca4u-deviceaccess.so.00.25, CU 0x1ca616, DIE 0x2c13fa>) at /usr/include/boost/bind/bind.hpp:957 #7 0x00007ffff6577812 in boost::detail::function::function_objinvoker4<boost:: bi::bind_t<boost::shared_ptr<mtca4u::NDRegisterAccessor >, boost::_mfi::mf4<boost::shared_ptr<mtca4u::NDRegisterAccessor >, mtca4u::LogicalNameMappingBackend, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>, boost::_bi::list5<boost::_bi::value<mtca4u::LogicalNameMappingBackend>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> > >, boost::shared_ptr<mtca4u::NDRegisterAccessor >, mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::invoke ( function_obj_ptr=..., a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:138 #8 0x00000000004ab456 in boost::function4<boost::shared_ptr<mtca4u::NDRegisterAccessor , mtca4u::RegisterPath const&, unsigned long, unsigned long, mtca4u::AccessModeFlags>::operator() (this=0xe64218, a0=..., a1=0, a2=0, a3=...) at /usr/include/boost/function/function_template.hpp:773 #9 0x00000000004a9b42 in ChimeraTK::DeviceBackend::getRegisterAccessor (this=0xe641e0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...) at /home/mhier/ChimeraTK/install/ include/mtca4u/DeviceBackend.h:146 #10 0x00000000004a8128 in mtca4u::Device::getOneDRegisterAccessor (this=0x7fffffffd3f0, registerPathName=..., numberOfWords=0, wordOffsetInRegister=0, flags=...) at /home/mhier/ChimeraTK/install/include/mtca4u/Device.h:518 #11 0x00000000004c7f40 in RegisterQTreeItem::RegisterQTreeItem (this=0xf51680, device=..., registerInfo=..., parent=0xa10ed0, propertiesWidgetProvider=...) at /home/mhier/ChimeraTK/sources/ QtHardMon/src/RegisterQTreeItem.cpp:16 #12 0x000000000046b3c2 in QtHardMon::populateRegisterTree (this=0x7fffffffd190, deviceItem=0x90ff20) at /home/mhier/ChimeraTK/sources/ QtHardMon/src/QtHardMon.cpp:974 #13 0x000000000046048b in QtHardMon::deviceSelected (this=0x7fffffffd190, deviceItem=0x90ff20) at /home/mhier/ChimeraTK/sources/QtHardMon/src/QtHardMon.cpp:269 #14 0x00000000004deb7d in QtHardMon::qt_static_metacall (_o=0x7fffffffd190, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fffffffc050) at /home/mhier/ChimeraTK/build/QtHardMon/src/moc_QtHardMon.cxx:86 #15 0x00007ffff6d8ef80 in QMetaObject::activate(QObject, QMetaObject const, int, void*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #16 0x00007ffff784adbb in QListWidget::currentItemChanged(QListWidgetItem, QListWidgetItem*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #17 0x00007ffff784af39 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

18 0x00007ffff6d8ef80 in QMetaObject::activate(QObject*, QMetaObject

const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #19 0x00007ffff783887a in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

20 0x00007ffff78389ef in QItemSelectionModel::setCurrentIndex(QModelIndex

const&, QFlags) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #21 0x00007ffff77e6b7c in QAbstractItemView::mousePressEvent(QMouseEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #22 0x00007ffff72fe490 in QWidget::event(QEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

23 0x00007ffff76c739e in QFrame::event(QEvent*) () from

/usr/lib/x86_64-linux-gnu/libQtGui.so.4 #24 0x00007ffff77ecd13 in QAbstractItemView::viewportEvent(QEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #25 0x00007ffff6d7aa26 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject, QEvent) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #26 0x00007ffff72a6fbc in QApplicationPrivate::notify_helper(QObject, QEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #27 0x00007ffff72ae0d6 in QApplication::notify(QObject, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

28 0x00007ffff6d7a8bd in QCoreApplication::notifyInternal(QObject*,

QEvent) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #29 0x00007ffff72ad6dd in QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget*, QWidget*, QPointer&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #30 0x00007ffff732b3f2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 #31 0x00007ffff732ac83 in QApplication::x11ProcessEvent(_XEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

32 0x00007ffff7354542 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

33 0x00007ffff475d197 in g_main_context_dispatch () from

/lib/x86_64-linux-gnu/libglib-2.0.so.0 #34 0x00007ffff475d3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #35 0x00007ffff475d49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

36 0x00007ffff6dab21e in QEventDispatcherGlib::processEvents(QFlags<

QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

37 0x00007ffff7354616 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4

38 0x00007ffff6d7913f in

QEventLoop::processEvents(QFlags) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #39 0x00007ffff6d794a5 in QEventLoop::exec(QFlags) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #40 0x00007ffff6d7f469 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

41 0x00000000004585d0 in main (argv=1, args=0x7fffffffd598) at

/home/mhier/ChimeraTK/sources/QtHardMon/src/main.cpp:18

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ChimeraTK/QtHardMon/issues/1#issuecomment-331845857, or mute the thread https://github.com/notifications/unsubscribe-auth/ACxnUmHj-kFAkkGJt-zwfnWqg0SACV-_ks5sl4XEgaJpZM4PiirM .

— You are receiving this because you authored the thread. Reply to this email directly, [ https://github.com/ChimeraTK/QtHardMon/issues/1#issuecomment-331850953 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AFsROZ7JJ_ssCVjaVadn7IobXJhUnnYtks5sl4v1gaJpZM4PiirM | mute the thread ] .

-- Martin Hierholzer DESY Notkestrasse 85 22607 Hamburg Office 55a / 123 Tel: +49 40 8998 1897 Mob: +49 176 992 46 476 Skype: mhier48

This e-mail may contain confidential and/or privileged information and is intended only for the use of the individual or entity named above. If you received it in error, please advise the sender immediately by reply e-mail and delete the original. Any further use - especially any form of publication - of this e-mail without explicit authorisation is strictly prohibited.

fmakowski commented 7 years ago

Ok, although I could not reproduce the bug, I have gone through the stack trace and decided to remake the solution for #2. Now I would say that it's done, but please try it yourself.

mhier commented 7 years ago

Seems to work, thanks!

mhier commented 7 years ago

Ah now I see the problem, it is still there. When using the logical name mapper with a target device which is not registered, opening the logical name mapper fails. QtHardMon still seems to try to get RegisterAccessors for the device, which then crashes. The crash is clearly a bug in the logical name mapper backend which I will fix later (should throw an exception instead), but I think QtHardMon shouldn't even try to do that.

Generally, the behaviour with the logical name mapping backend seems to be a bit weird. It always stays closed at first after clicking on it, and even after opening it manually with the button (which will change the state to opened) no registers appear in the list...

mhier commented 5 years ago

It seems there is no longer a segfault, but the exception thrown by DeviceAccess is not caught properly by QtHardMon. Instead the "unhandled exception" message appears and QtHardMon gets restarted. It would be better to catch exceptions which happens during opening of the device and display them properly.