[crash] Crash in graph visualizer
Crash after changing subscriptions on a graph visualizer, and start to receive data.
Stack trace (most recent call last):
#25 Object "", at 0xffffffffffffffff, in
#24 Source "../sysdeps/x86_64/start.S", line 115, in _start [0x55615c3b0010]
#23 Source "../csu/libc-start.c", line 381, in __libc_start_main_impl [0x7f62bf240244]
#22 Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7f62bf24018b]
#21 Source "/home/davide/Documents/Skyward/skywardhub-light/src/entrypoints/groundstation/main.cpp", line 32, in main [0x55615c3aff6c]
29: application.setStyleSheet(skywardHub.styleSheet());
30: skywardHub.show();
31:
> 32: application.exec();
33:
34: return 0;
35: }
#20 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bfabaa55, in QCoreApplication::exec()
#19 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bfab28ea, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#18 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bfb0c075, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#17 Object "/usr/lib/libglib-2.0.so.0.7800.0", at 0x7f62be71644b, in g_main_context_iteration
#16 Object "/usr/lib/libglib-2.0.so.0.7800.0", at 0x7f62be715e76, in
#15 Object "/usr/lib/libglib-2.0.so.0.7800.0", at 0x7f62be712fa6, in
#14 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bfb0cbcc, in
#13 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bfab3e77, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#12 Object "/usr/lib/libQt5Widgets.so.5.15.7", at 0x7f62c0962fcd, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#11 Object "/usr/lib/libQt5SerialPort.so.5.15.7", at 0x7f62c15a618c, in
#10 Object "/usr/lib/libQt5SerialPort.so.5.15.7", at 0x7f62c15a3c36, in
#9 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bfaeb5fc, in
#8 Source "/home/davide/Documents/Skyward/skywardhub-light/src/shared/Modules/Mavlink/Ports/SerialPort.cpp", line 57, in onReadyRead [0x55615c4a37e3]
54: void SerialPort::onReadyRead()
55: {
56: auto data = serial.readAll();
> 57: emit bytesReceived(data.data(), data.size());
58: }
#7 Source "/home/davide/Documents/Skyward/skywardhub-light/build/groundstation_autogen/W624ZTK5KS/moc_MavlinkPort.cpp", line 136, in bytesReceived [0x55615c3b2593]
133: void MavlinkPort::bytesReceived(const char * _t1, qsizetype _t2)
134: {
135: void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))), const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t2))) };
> 136: QMetaObject::activate(this, &staticMetaObject, 0, _a);
137: }
138: QT_WARNING_POP
139: QT_END_MOC_NAMESPACE
#6 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bfaeb5fc, in
#5 Source "/home/davide/Documents/Skyward/skywardhub-light/src/shared/Modules/Mavlink/MavlinkCodec.cpp", line 98, in onBytesReceived [0x55615c4a9b57]
95: {
96: if (mavlink_parse_char(MAVLINK_COMM_0, data[i], &mavlinkMessage,
97: &mavlinkStatus))
> 98: emit msgReceived(decodeMessage(mavlinkMessage));
99: }
100:
101: if (logFile.isOpen())
#4 Source "/home/davide/Documents/Skyward/skywardhub-light/build/groundstation_autogen/5TMKDCJ7NY/moc_MavlinkCodec.cpp", line 147, in msgReceived [0x55615c3b2521]
144: void MavlinkCodec::msgReceived(const Message & _t1)
145: {
146: void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
> 147: QMetaObject::activate(this, &staticMetaObject, 0, _a);
148: }
149: QT_WARNING_POP
150: QT_END_MOC_NAMESPACE
#3 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bfaeb5fc, in
#2 | Source "/home/davide/Documents/Skyward/skywardhub-light/src/shared/Core/MessageBroker/MessageBroker.cpp", line 58, in operator()
| 56: auto copy = message;
| 57: filter.filterMessage(copy);
| > 58: (*subscriber.second)(copy, filter);
| 59: }
| 60: }
Source "/usr/include/c++/12.2/bits/std_function.h", line 591, in publish [0x55615c3dd5e0]
588: {
589: if (_M_empty())
590: __throw_bad_function_call();
> 591: return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...);
592: }
593:
594: #if __cpp_rtti
#1 | Source "/usr/include/c++/12.2/bits/std_function.h", line 290, in __invoke_r<void, Graph::onFilterAdded(const Filter&)::<lambda(const Message&, const Filter&)>&, const Message&, const Filter&>
| 288: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
| 289: {
| > 290: return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor),
| 291: std::forward<_ArgTypes>(__args)...);
| 292: }
| Source "/usr/include/c++/12.2/bits/invoke.h", line 154, in __invoke_impl<void, Graph::onFilterAdded(const Filter&)::<lambda(const Message&, const Filter&)>&, const Message&, const Filter&>
| 152: using __type = typename __result::type;
| 153: using __tag = typename __result::__invoke_type;
| > 154: std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn),
| 155: std::forward<_Args>(__args)...);
| 156: }
| Source "/usr/include/c++/12.2/bits/invoke.h", line 61, in operator()
| 59: constexpr _Res
| 60: __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args)
| > 61: { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); }
| 62:
| 63: template<typename _Res, typename _MemFun, typename _Tp, typename... _Args>
Source "/home/davide/Documents/Skyward/skywardhub-light/src/shared/Modules/Graph/Graph.cpp", line 174, in _M_invoke [0x55615c49a30e]
171: message.getField("timestamp").getUnsignedInteger() / 1e6;
172: double y = message.getField(field).getDouble();
173:
> 174: lines[filter].first[field].graph->setName(field + ": " +
175: QString::number(y));
176:
177: // Check if the timestamp resets
#0 Object "/usr/lib/libQt5Core.so.5.15.7", at 0x7f62bf94fd29, in QString::operator=(QString const&)
Edited by Davide Mor