Open light92131 opened 1 month ago
I'm guessing this is a settings issue. Try looking for the Qt settings file on your machine and changing the value for UDP::Protocol to "JSON".
It would still be nice to have it catch this, I will look into a fix.
I did not have any luck finding a Qt settings file. But, I looked at lines 99-102 in udp_server.cpp
. After clicking Start
-- but before the crash -- we look for UDP_Server::protocol
in QSettings
. (I can't figure out where the QSettings
file is :( )
Is that what you're referring to?
It looks like QString protocol
defaults to "JSON" in any case. That's the value I see in protocol
after line 100 executes.
Thanks for looking at this!
Same crash here, just my luck that I wanted to try out for the first time the UDP stream functionality today. My crash report looks to have some extra info, this is version 3.9.2 installed from the AUR for reference.
[dsa@rockyraccoon ~]$ plotjuggler
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Loading compatible plugins from directory: "/usr/local/bin"
"libDataLoadCSV.so is a DataLoader plugin"
"libDataLoadMCAP.so is a DataLoader plugin"
"libDataLoadParquet.so" : "Cannot load library /usr/local/bin/libDataLoadParquet.so: (libparquet.so.1600: cannot open shared object file: No such file or directory)"
"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"
"libParserLineInflux.so is a MessageParser plugin"
"libParserROS1.so is a MessageParser plugin"
"libParserROS2.so is a MessageParser plugin"
"libProtobufParser.so" : "Cannot load library /usr/local/bin/libProtobufParser.so: (libprotobuf.so.25: cannot open shared object file: No such file or directory)"
"libPublisherCSV.so is a StatePublisher plugin"
"libPublisherVideoViewer.so" : "Cannot load library /usr/local/bin/libPublisherVideoViewer.so: (/usr/local/bin/libPublisherVideoViewer.so: undefined symbol: _ZN11VideoDialog16updateSliderUnitEv)"
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/dsa/.local/share/PlotJuggler"
Number of plugins loaded: 0
terminate called after throwing an instance of 'std::out_of_range'
what(): map::at
Stack trace (most recent call last):
#31 | Source "../glib/glib/gmain.c", line 4217, in g_main_context_dispatch_unlocked
Source "../glib/glib/gmain.c", line 4152, in g_main_context_iterate_unlocked [0x7eb3d4b769e6]
#30 Source "../glib/glib/gmain.c", line 3344, in g_main_dispatch [0x7eb3d4b14ab8]
#29 Object "/usr/lib/libQt5WaylandClient.so.5.15.14", at 0x7eb3d1a52e34, in userEventSourceDispatch(_GSource*, int (*)(void*), void*)
#28 Source "kernel/qwindowsysteminterface.cpp", line 1169, in sendWindowSystemEvents [0x7eb3d671cdcc]
#27 Source "kernel/qguiapplication.cpp", line 2285, in processMouseEvent [0x7eb3d673ba8f]
#26 Source "kernel/qcoreapplication.cpp", line 1064, in notifyInternal2 [0x7eb3d62aba67]
#25 Source "kernel/qapplication.cpp", line 3640, in notify_helper [0x7eb3d6f56330]
#24 Source "kernel/qwidgetwindow.cpp", line 300, in event [0x7eb3d6faacc6]
#23 Source "kernel/qwidgetwindow.cpp", line 684, in handleMouseEvent [0x7eb3d6fa8c89]
#22 Source "kernel/qapplication.cpp", line 2622, in sendMouseEvent [0x7eb3d6f59df4]
#21 Source "kernel/qcoreapplication.cpp", line 1064, in notifyInternal2 [0x7eb3d62aba67]
#20 Source "kernel/qapplication.cpp", line 3084, in notify [0x7eb3d6f5c0d0]
#19 Source "kernel/qapplication.cpp", line 3640, in notify_helper [0x7eb3d6f56330]
#18 Source "kernel/qwidget.cpp", line 8671, in event [0x7eb3d6f8f7c5]
#17 Source "widgets/qabstractbutton.cpp", line 1045, in mouseReleaseEvent [0x7eb3d70482d1]
#16 Source "widgets/qabstractbutton.cpp", line 409, in click [0x7eb3d7048100]
#15 Source "widgets/qabstractbutton.cpp", line 416, in emitClicked [0x7eb3d7046b72]
#14 Source ".moc/moc_qabstractbutton.cpp", line 308, in clicked [0x7eb3d70441a4]
#13 Source "kernel/qobject.cpp", line 3951, in doActivate<false> [0x7eb3d62df836]
#12 Source "/usr/src/debug/plotjuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp", line 524, in qt_metacall [0x6479f89be9d9]
521: return _id;
522: if (_c == QMetaObject::InvokeMetaMethod) {
523: if (_id < 68)
> 524: qt_static_metacall(this, _c, _id, _a);
525: _id -= 68;
526: } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
527: if (_id < 68)
#11 Source "/usr/src/debug/plotjuggler/PlotJuggler-3.9.2/plotjuggler_app/mainwindow.cpp", line 3397, in on_buttonStreamingStart_clicked [0x6479f8a0ba02]
3394: ui->buttonStreamingStart->setEnabled(false);
3395: if (ui->buttonStreamingStart->text() == "Start")
3396: {
>3397: startStreamingPlugin(ui->comboStreaming->currentText());
3398: }
3399: else
3400: {
#10 Source "/usr/src/debug/plotjuggler/PlotJuggler-3.9.2/plotjuggler_app/mainwindow.cpp", line 1728, in startStreamingPlugin [0x6479f89f4716]
1725: try
1726: {
1727: // TODO data sources (argument to _active_streamer_plugin->start()
>1728: started = _active_streamer_plugin && _active_streamer_plugin->start(nullptr);
1729: }
1730: catch (std::runtime_error& err)
1731: {
#9 Source "/usr/src/debug/plotjuggler/PlotJuggler-3.9.2/plotjuggler_plugins/DataStreamUDP/udp_server.cpp", line 130, in start [0x7eb39bfdb414]
127: onComboChanged);
128:
129: dialog.ui->comboBoxProtocol->setCurrentText(protocol);
> 130: onComboChanged(protocol);
131:
132: int res = dialog.exec();
133: if (res == QDialog::Rejected)
#8 | Source "/usr/src/debug/plotjuggler/PlotJuggler-3.9.2/plotjuggler_plugins/DataStreamUDP/udp_server.cpp", line 117, in at
| 115: }
| 116: }
| > 117: parser_creator = parserFactories()->at(selected_protocol);
| 118:
| 119: if (auto widget = parser_creator->optionsWidget())
Source "/usr/include/c++/14.1.1/bits/stl_map.h", line 562, in operator() [0x7eb39bfcf71a]
559: {
560: const_iterator __i = lower_bound(__k);
561: if (__i == end() || key_comp()(__k, (*__i).first))
> 562: __throw_out_of_range(__N("map::at"));
563: return (*__i).second;
564: }
#7 Source "/usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/functexcept.cc", line 86, in __throw_out_of_range [0x7eb3d5c9b2a7]
#6 Source "/usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc", line 98, in __cxa_throw [0x7eb3d5cae2b5]
#5 Source "/usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc", line 58, in terminate [0x7eb3d5c97529]
#4 Source "/usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc", line 48, in __builtin_abort [0x7eb3d5cadff9]
#3 Source "/usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc", line 95, in __verbose_terminate_handler [0x7eb3d5c97b2b]
#2 Source "/usr/src/debug/glibc/glibc/stdlib/abort.c", line 79, in abort [0x7eb3d5a334c2]
#1 Source "../sysdeps/posix/raise.c", line 26, in raise [0x7eb3d5a4c11f]
#0 Source "/usr/src/debug/glibc/glibc/nptl/pthread_kill.c", line 44, in __pthread_kill_implementation [0x7eb3d5aa53f4]
Aborted (Signal sent by tkill() 89667 1000)
Aborted (core dumped)
@zdavkeos : I found the settings file, and added an entry to set UDP protocol to "JSON." No change.
I've attached a patch here that appears to fix the immediate issue. I can turn this into a PR if it looks appropriate.
Problem description
Let me say, I'm sure this is a local problem of some sort; others seem to use UDP Server without trouble. But for me:
Launch PlotJuggler; select UDP Server in Streaming drop-down; click Start. PlotJuggler terminates with:
(full backtrace below)
Answer these questions (or I will ignore your issue)
Describe your platform / Operative System and the version of PlotJuggler you are using:
Compile and try the latest version in the main branch and check if the problem persists.
See above; built with:
Behavior is the same with or without
-t
. But maybe I need to do something with the sample data before Starting?No data source here; just
Start
ing the UDP Server.Here is the backtrace output from PlotJuggler:
Here is a screenshot of Eclipse debug session that has additional info. Executing line 117 in
udp_server.cpp
:Thanks for listening!