Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seg Fault when closing #778

Closed
jparisu opened this issue Jan 12, 2023 · 1 comment · Fixed by #784
Closed

Seg Fault when closing #778

jparisu opened this issue Jan 12, 2023 · 1 comment · Fixed by #784

Comments

@jparisu
Copy link

jparisu commented Jan 12, 2023

Problem description

When closing PlotJuggler, it gives a seg fault.
It happens just opening and closing the application, without touching anything.

Steps to reproduce (important)

  • Describe your platform / Operative System.
    Ubuntu 22.04
    Installation from sources as specified in https://github.com/facontidavide/PlotJuggler/blob/main/COMPILE.md

  • Check if the problem can be reproduced using the dummy data created by the command line argument "-t" or one of the files in the folder "datasamples".
    The problem is on closure, and happens without even open or touch anything.

  • If it can't be reproduced with the dummy data, please share the CSV file or the rosbag that can be used to reproduce the problem.

Traces

stdout

eprosima   ~/projects/current/desktop $ ./install/plotjuggler/bin/plotjuggler 
Loading compatible plugins from directory:  "/home/eprosima/projects/current/desktop/install/plotjuggler/bin"
"libDataLoadCSV.so is a DataLoader plugin"
"libDataLoadMCAP.so is a DataLoader plugin"
"libDataLoadULog.so is a DataLoader plugin"
"libDataStreamSample.so is a DataStreamer plugin"  ...disabled, unless option -t is used
"libDataStreamUDP.so is a DataStreamer plugin"
"libDataStreamWebSocket.so is a DataStreamer plugin"
"libParserROS1.so is a MessageParser plugin"
"libParserROS2.so is a MessageParser plugin"
"libProtobufParser.so is a MessageParser plugin"
"libPublisherCSV.so is a StatePublisher plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxFFT.so is a Toolbox plugin"
"libToolboxLuaEditor.so is a Toolbox plugin"
Type conversion already registered from type QString to type QwtText
"libToolboxQuaternion.so is a Toolbox plugin"
Number of plugins loaded:  12 

Loading compatible plugins from directory:  "/home/eprosima/.local/share/PlotJuggler"
Number of plugins loaded:  0 

Stack trace (most recent call last):
#24   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#23   Object "./install/plotjuggler/bin/plotjuggler", at 0x5567a02c77a4, in 
#22   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f1c7daf3e3f, in __libc_start_main
#21   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f1c7daf3d8f, in 
#20   Object "./install/plotjuggler/bin/plotjuggler", at 0x5567a02c59dc, in 
#19   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f1c7e2e3cf3, in QCoreApplication::exec()
#18   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f1c7e2db75a, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#17   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f1c7e3360b7, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#16   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f1c7d1243e2, in g_main_context_iteration
#15   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f1c7d17b6c7, in 
#14   Object "/lib/x86_64-linux-gnu/libglib-2.0.so.0", at 0x7f1c7d126d3a, in g_main_context_dispatch
#13   Object "/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5", at 0x7f1c79892d6d, in 
#12   Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7f1c7e698a2b, in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#11   Object "/lib/x86_64-linux-gnu/libQt5Gui.so.5", at 0x7f1c7e6bff1c, in QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent*)
#10   Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f1c7e2dce39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#9    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f1c7edce712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#8    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f1c7ee2e127, in 
#7    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f1c7ee0c7ff, in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode)
#6    Object "/lib/x86_64-linux-gnu/libQt5Core.so.5", at 0x7f1c7e2dce39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#5    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f1c7edce712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#4    Object "/lib/x86_64-linux-gnu/libQt5Widgets.so.5", at 0x7f1c7ee114ed, in QWidget::event(QEvent*)
#3    Object "./install/plotjuggler/bin/plotjuggler", at 0x5567a030998c, in 
#2    Object "./install/plotjuggler/bin/plotjuggler", at 0x5567a02da799, in 
#1    Object "/home/eprosima/projects/current/desktop/install/plotjuggler/bin/libDataLoadCSV.so", at 0x7f1c583eb0a5, in DataLoadCSV::~DataLoadCSV()
#0    Object "/home/eprosima/projects/current/desktop/install/plotjuggler/bin/libDataLoadCSV.so", at 0x7f1c583eb006, in DataLoadCSV::~DataLoadCSV()
Segmentation fault (Address not mapped to object [0x5562f417726a])
Segmentation fault (core dumped)

GDB trace

#0  __pthread_kill_implementation (no_tid=0, signo=11, threadid=139760298969024) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=11, threadid=139760298969024) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=139760298969024, signo=signo@entry=11) at ./nptl/pthread_kill.c:89
#3  0x00007f1c7db0c476 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#4  0x00005567a03c74a2 in backward::SignalHandling::sig_handler (signo=<optimized out>, info=0x7f1c7af90b30, _ctx=<optimized out>)
    at /home/eprosima/projects/current/desktop/src/plotjuggler/3rdparty/backward-cpp/backward.hpp:3979
#5  <signal handler called>
#6  0x00007f1c583eb006 in DataLoadCSV::~DataLoadCSV (this=0x5567a26260e0, __in_chrg=<optimized out>)
    at /home/eprosima/projects/current/desktop/src/plotjuggler/plotjuggler_plugins/DataLoadCSV/dataload_csv.cpp:144
#7  0x00007f1c583eb0a6 in DataLoadCSV::~DataLoadCSV (this=0x5567a26260e0, __in_chrg=<optimized out>)
    at /home/eprosima/projects/current/desktop/src/plotjuggler/plotjuggler_plugins/DataLoadCSV/dataload_csv.cpp:145
#8  0x00005567a02da79a in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x5567a26de140) at /usr/include/c++/11/bits/shared_ptr_base.h:168
#9  0x00005567a030998d in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x5567a26de4a0, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/shared_ptr_base.h:705
#10 std::__shared_ptr<PJ::DataLoader, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x5567a26de498, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/shared_ptr_base.h:1154
#11 std::shared_ptr<PJ::DataLoader>::~shared_ptr (this=0x5567a26de498, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/shared_ptr.h:122
#12 std::pair<QString const, std::shared_ptr<PJ::DataLoader> >::~pair (this=0x5567a26de490, __in_chrg=<optimized out>) at /usr/include/c++/11/bits/stl_pair.h:211
#13 __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > >::destroy<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > (__p=0x5567a26de490, 
    this=<optimized out>) at /usr/include/c++/11/ext/new_allocator.h:168
#14 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > > >::destroy<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > (
    __p=0x5567a26de490, __a=...) at /usr/include/c++/11/bits/alloc_traits.h:535
#15 std::_Rb_tree<QString, std::pair<QString const, std::shared_ptr<PJ::DataLoader> >, std::_Select1st<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > >, std::less<QString>, std::allocator<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > >::_M_destroy_node (__p=0x5567a26de470, this=<optimized out>) at /usr/include/c++/11/bits/stl_tree.h:623
#16 std::_Rb_tree<QString, std::pair<QString const, std::shared_ptr<PJ::DataLoader> >, std::_Select1st<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > >, std::less<QString>, std::allocator<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > >::_M_drop_node (__p=0x5567a26de470, this=<optimized out>) at /usr/include/c++/11/bits/stl_tree.h:631
#17 std::_Rb_tree<QString, std::pair<QString const, std::shared_ptr<PJ::DataLoader> >, std::_Select1st<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > >, std::less<QString>, std::allocator<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > >::_M_erase (this=<optimized out>, __x=0x5567a26de470) at /usr/include/c++/11/bits/stl_tree.h:1891
#18 std::_Rb_tree<QString, std::pair<QString const, std::shared_ptr<PJ::DataLoader> >, std::_Select1st<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > >, std::less<QString>, std::allocator<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > >::clear (this=0x5567a2032420) at /usr/include/c++/11/bits/stl_tree.h:1254
#19 std::map<QString, std::shared_ptr<PJ::DataLoader>, std::less<QString>, std::allocator<std::pair<QString const, std::shared_ptr<PJ::DataLoader> > > >::clear (this=0x5567a2032420)
    at /usr/include/c++/11/bits/stl_map.h:1134
#20 MainWindow::closeEvent (this=0x5567a2032230, event=<optimized out>) at /home/eprosima/projects/current/desktop/src/plotjuggler/plotjuggler_app/mainwindow.cpp:2655
#21 0x00007f1c7ee114ee in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f1c7edce713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f1c7e2dce3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007f1c7ee0c800 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007f1c7ee2e128 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007f1c7edce713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f1c7e2dce3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007f1c7e6bff1d in QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#29 0x00007f1c7e698a2c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#30 0x00007f1c79892d6e in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#31 0x00007f1c7d126d3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f1c7d17b6c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f1c7d1243e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f1c7e3360b8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007f1c7e2db75b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007f1c7e2e3cf4 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00005567a02c59dd in main (argc=<optimized out>, argv=<optimized out>) at /home/eprosima/projects/current/desktop/src/plotjuggler/plotjuggler_app/main.cpp:432
@MichaelOrlov
Copy link
Contributor

@jparisu @facontidavide I have a fix for this issue in #784
Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants