PlotJuggler / plotjuggler-ros-plugins

Many PlotJuggler plugins for ROS and ROS2.
GNU Affero General Public License v3.0
109 stars 44 forks source link

[Humble] Segmentation fault (Address not mapped to object [0x1e0] #65

Closed Ogunniran closed 1 year ago

Ogunniran commented 1 year ago
Loading compatible plugins from directory:  "/home/ws_ros2/install/plotjuggler_ros/lib/plotjuggler_ros"
"libDataLoadROS2.so is a DataLoader plugin"
"libDataStreamROS2.so is a DataStreamer plugin"
[WARN] [1684830914.399383185] [rclcpp]: logging was initialized more than once
"libTopicPublisherROS2.so is a StatePublisher plugin"
Number of plugins loaded:  3 

Loading compatible plugins from directory:  "/home/ws_ros2/install/plotjuggler/lib/plotjuggler"
"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"
"libDataStreamZMQ.so is a DataStreamer plugin"
"libParserDataTamer.so is a MessageParser 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:  14 

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

Stack trace (most recent call last):
#31   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4b9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#30   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e16c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#29   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e1cbfd4, in 
#28   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e1c8d3f, in 
#27   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e172e46, in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)
#26   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4b9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#25   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e174363, in QApplication::notify(QObject*, QEvent*)
#24   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e16c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#23   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e1af4ed, in QWidget::event(QEvent*)
#22   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e2641e6, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)
#21   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e263fc3, in 
#20   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e26239d, in 
#19   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e262115, in QAbstractButton::clicked(bool)
#18   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4f14e4, in 
#17   Source "/home/paul/ws_ros2/build/plotjuggler/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp", line 515, in qt_metacall [0x55614cd2e199]
        512:         return _id;
        513:     if (_c == QMetaObject::InvokeMetaMethod) {
        514:         if (_id < 66)
      > 515:             qt_static_metacall(this, _c, _id, _a);
        516:         _id -= 66;
        517:     } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        518:         if (_id < 66)
#16   Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 3349, in on_buttonStreamingStart_clicked [0x55614cd70fd2]
       3346:   ui->buttonStreamingStart->setEnabled(false);
       3347:   if (ui->buttonStreamingStart->text() == "Start")
       3348:   {
      >3349:     startStreamingPlugin(ui->comboStreaming->currentText());
       3350:   }
       3351:   else
       3352:   {
#15   Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 1695, in startStreamingPlugin [0x55614cd6788b]
       1692:   try
       1693:   {
       1694:     // TODO data sources (argument to _active_streamer_plugin->start()
      >1695:     started = _active_streamer_plugin && _active_streamer_plugin->start(nullptr);
       1696:   }
       1697:   catch (std::runtime_error& err)
       1698:   {
#14   Source "/home/paul/ws_ros2/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp", line 144, in start [0x7f4d584dd1ed]
        141:   });
        142: 
        143:   //-----------------------------
      > 144:   waitOneSecond();
        145:   return true;
        146: }
#13   Source "/home/paul/ws_ros2/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp", line 48, in waitOneSecond [0x7f4d584dc6f8]
         45:   {
         46:     int msec = duration_cast<milliseconds>(system_clock::now() - start_time).count();
         47:     progress_dialog.setValue(msec);
      >  48:     QApplication::processEvents();
         49:     if (progress_dialog.wasCanceled())
         50:     {
         51:       break;
#12   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d513111, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#11   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f4d8c31e3e2, in g_main_context_iteration
#10   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f4d8c3756c7, in 
#9    Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f4d8c320d3a, in g_main_context_dispatch
#8    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d512ceb, in 
#7    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d5123ea, in QTimerInfoList::activateTimers()
#6    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4b9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#5    Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f4d8e16c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#4    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4e733e, in QObject::event(QEvent*)
#3    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4f57fd, in QTimer::timeout(QTimer::QPrivateSignal)
#2    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f4d8d4f1792, in 
#1    Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 2390, in updateDataAndReplot [0x55614cd66d20]
       2387:       _curvelist_widget->refreshColumns();
       2388:     }
       2389: 
      >2390:     _mapped_plot_data.setMaximumRangeX(ui->streamingSpinBox->value());
       2391:   }
       2392: 
       2393:   const bool is_streaming_active = isStreamingActive();
#0  | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/src/plotdata.cpp", line 140, in setMaximumRangeX
    |   138:   for (auto& it : strings)
    |   139:   {
    | > 140:     it.second.setMaximumRangeX(range);
    |   141:   }
    |   142:   for (auto& it : user_defined)
    | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 45, in trimRange
    |    43:   {
    |    44:     _max_range_x = max_range;
    | >  45:     trimRange();
    |    46:   }
    | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 86, in trimRange
    |    85: private:
    | >  86:   void trimRange()
    |    87:   {
    |    88:     if(_max_range_x < std::numeric_limits<double>::max())
      Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 90, in setMaximumRangeX [0x55614ce90c45]
         87:   {
         88:     if(_max_range_x < std::numeric_limits<double>::max())
         89:     {
      >  90:       auto const back_point_x = _points.back().x;
         91:       while (_points.size() > 2 && (back_point_x - _points.front().x) > _max_range_x)
         92:       {
         93:         this->popFront();
Segmentation fault (Address not mapped to object [0x1e0])
[ros2run]: Segmentation fault
paul@paul-Precision-3541:~/ws_ros2$ ros2 run plotjuggler plotjuggler 
Loading compatible plugins from directory:  "/home/paul/ws_ros2/install/plotjuggler_ros/lib/plotjuggler_ros"
"libDataLoadROS2.so is a DataLoader plugin"
"libDataStreamROS2.so is a DataStreamer plugin"
[WARN] [1684831191.706553499] [rclcpp]: logging was initialized more than once
"libTopicPublisherROS2.so is a StatePublisher plugin"
Number of plugins loaded:  3 

Loading compatible plugins from directory:  "/home/paul/ws_ros2/install/plotjuggler/lib/plotjuggler"
"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"
"libDataStreamZMQ.so is a DataStreamer plugin"
"libParserDataTamer.so is a MessageParser 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:  14 

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

Stack trace (most recent call last):
#31   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3ab9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#30   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b476c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#29   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b47cbfd4, in 
#28   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b47c8d3f, in 
#27   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b4772e46, in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool)
#26   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3ab9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#25   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b4774363, in QApplication::notify(QObject*, QEvent*)
#24   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b476c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#23   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b47af4ed, in QWidget::event(QEvent*)
#22   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b48641e6, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)
#21   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b4863fc3, in 
#20   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b486239d, in 
#19   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b4862115, in QAbstractButton::clicked(bool)
#18   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3af14e4, in 
#17   Source "/home/paul/ws_ros2/build/plotjuggler/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp", line 515, in qt_metacall [0x56461d9d3199]
        512:         return _id;
        513:     if (_c == QMetaObject::InvokeMetaMethod) {
        514:         if (_id < 66)
      > 515:             qt_static_metacall(this, _c, _id, _a);
        516:         _id -= 66;
        517:     } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        518:         if (_id < 66)
#16   Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 3349, in on_buttonStreamingStart_clicked [0x56461da15fd2]
       3346:   ui->buttonStreamingStart->setEnabled(false);
       3347:   if (ui->buttonStreamingStart->text() == "Start")
       3348:   {
      >3349:     startStreamingPlugin(ui->comboStreaming->currentText());
       3350:   }
       3351:   else
       3352:   {
#15   Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 1695, in startStreamingPlugin [0x56461da0c88b]
       1692:   try
       1693:   {
       1694:     // TODO data sources (argument to _active_streamer_plugin->start()
      >1695:     started = _active_streamer_plugin && _active_streamer_plugin->start(nullptr);
       1696:   }
       1697:   catch (std::runtime_error& err)
       1698:   {
#14   Source "/home/paul/ws_ros2/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp", line 144, in start [0x7f87802221ed]
        141:   });
        142: 
        143:   //-----------------------------
      > 144:   waitOneSecond();
        145:   return true;
        146: }
#13   Source "/home/paul/ws_ros2/src/plotjuggler-ros-plugins/plugins/DataStreamROS2/datastream_ros2.cpp", line 48, in waitOneSecond [0x7f87802216f8]
         45:   {
         46:     int msec = duration_cast<milliseconds>(system_clock::now() - start_time).count();
         47:     progress_dialog.setValue(msec);
      >  48:     QApplication::processEvents();
         49:     if (progress_dialog.wasCanceled())
         50:     {
         51:       break;
#12   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3b13111, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#11   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f87b291e3e2, in g_main_context_iteration
#10   Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f87b29756c7, in 
#9    Object "/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4", at 0x7f87b2920d3a, in g_main_context_dispatch
#8    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3b12ceb, in 
#7    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3b123ea, in QTimerInfoList::activateTimers()
#6    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3ab9e39, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#5    Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f87b476c712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#4    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3ae733e, in QObject::event(QEvent*)
#3    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3af57fd, in QTimer::timeout(QTimer::QPrivateSignal)
#2    Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f87b3af1792, in 
#1    Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_app/mainwindow.cpp", line 2390, in updateDataAndReplot [0x56461da0bd20]
       2387:       _curvelist_widget->refreshColumns();
       2388:     }
       2389: 
      >2390:     _mapped_plot_data.setMaximumRangeX(ui->streamingSpinBox->value());
       2391:   }
       2392: 
       2393:   const bool is_streaming_active = isStreamingActive();
#0  | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/src/plotdata.cpp", line 140, in setMaximumRangeX
    |   138:   for (auto& it : strings)
    |   139:   {
    | > 140:     it.second.setMaximumRangeX(range);
    |   141:   }
    |   142:   for (auto& it : user_defined)
    | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 45, in trimRange
    |    43:   {
    |    44:     _max_range_x = max_range;
    | >  45:     trimRange();
    |    46:   }
    | Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 86, in trimRange
    |    85: private:
    | >  86:   void trimRange()
    |    87:   {
    |    88:     if(_max_range_x < std::numeric_limits<double>::max())
      Source "/home/paul/ws_ros2/src/PlotJuggler/plotjuggler_base/include/PlotJuggler/timeseries.h", line 90, in setMaximumRangeX [0x56461db35c45]
         87:   {
         88:     if(_max_range_x < std::numeric_limits<double>::max())
         89:     {
      >  90:       auto const back_point_x = _points.back().x;
         91:       while (_points.size() > 2 && (back_point_x - _points.front().x) > _max_range_x)
         92:       {
         93:         this->popFront();
Segmentation fault (Address not mapped to object [0x1e0])
[ros2run]: Segmentation fault
facontidavide commented 1 year ago

thanks for reporting, I will fix it

facontidavide commented 1 year ago

I just pushed a fix in the main branch of PlotJuggler. Check if your problem is solved, please

Ogunniran commented 1 year ago

Thanks for the quick fix. Tested it and it works fine now.