facontidavide / PlotJuggler

The Time Series Visualization Tool that you deserve.
https://www.plotjuggler.io
Mozilla Public License 2.0
4.37k stars 610 forks source link

Crash when loading layout file #545

Closed jmailloux closed 2 years ago

jmailloux commented 2 years ago

Thanks for contributing to PlotJuggler. You are great!

Problem description

I save a layout file that has a Custom Series called Power (save custom transformations option is selected. It multiplies current and voltage. I then close plotjuggler and reopen it, and load the layout file. It crashes in lua_rawgeti.

I've attached the layout file.

This is using main. The crash does not happen on 3.2.

Steps to reproduce (important)

See description

tomcat327 commented 2 years ago

I'm seeing similar issues on Ubuntu with ros2 run plotjuggler plotjuggler -d <bag_file> -l <layout_file>

facontidavide commented 2 years ago

Hi @jmailloux

The layout you shared don't contain the information about the file, therefore I assume you first load the file and then load the layout.

I can not reproduce the error. Can you send the entire backtrace?

jmailloux commented 2 years ago

Hi @facontidavide.

All I have to do is load the layout file. There is no log file if that is what you are asking. If I load a log file first, then load the layout file. Same thing happens. Here is the stack trace:

Stack trace (most recent call last):

31 Object "CoreFoundation", at 0x7fff20492d0a, in __CFRunLoopDoSources0 + 242

30 Object "CoreFoundation", at 0x7fff20492f94, in __CFRunLoopDoSource0 + 180

29 Object "CoreFoundation", at 0x7fff2049302c, in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17

28 Object "libqcocoa.dylib", at 0x112ef5f98, in qt_plugin_instance + 199080

27 Object "QtGui", at 0x10b38513b, in QWindowSystemInterface::sendWindowSystemEvents(QFlags) + 203

26 Object "QtGui", at 0x10b39fbdf, in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 3615

25 Object "QtCore", at 0x10c40f2b6, in QCoreApplication::notifyInternal2(QObject, QEvent) + 166

24 Object "QtWidgets", at 0x10a5b9e02, in QApplication::notify(QObject, QEvent) + 466

23 Object "QtWidgets", at 0x10a5b8a56, in QApplicationPrivate::notify_helper(QObject, QEvent) + 262

22 Object "QtWidgets", at 0x10a60f3de, in QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) + 4622

21 Object "QtWidgets", at 0x10a610ca5, in QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) + 10965

20 Object "QtWidgets", at 0x10a5b9362, in QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget, QWidget**, QPointer&, bool, bool) + 898

19 Object "QtCore", at 0x10c40f2b6, in QCoreApplication::notifyInternal2(QObject, QEvent) + 166

18 Object "QtWidgets", at 0x10a5bb944, in QApplication::notify(QObject, QEvent) + 7444

17 Object "QtWidgets", at 0x10a5b8a56, in QApplicationPrivate::notify_helper(QObject, QEvent) + 262

16 Object "QtWidgets", at 0x10a5f1d0a, in QWidget::event(QEvent*) + 442

15 Object "QtWidgets", at 0x10a6a0e6c, in QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 268

14 Object "QtWidgets", at 0x10a69fca9, in QAbstractButton::isCheckable() const + 457

13 Object "QtWidgets", at 0x10a69fe2f, in QAbstractButton::isCheckable() const + 847

12 Object "QtCore", at 0x10c44001d, in QMetaObject::activate(QObject, QMetaObject const, int, void**) + 3373

11 Object "plotjuggler", at 0x100cd90ce, in MainWindow::qt_metacall(QMetaObject::Call, int, void**) + 78

10 Object "plotjuggler", at 0x100d1eefe, in MainWindow::on_pushButtonLoadLayout_clicked() + 414

9 Object "plotjuggler", at 0x100d07dfb, in MainWindow::loadLayoutFromFile(QString) + 6123

8 Object "plotjuggler", at 0x100d683ae, in LuaCustomFunction::xmlLoadState(QDomElement const&) + 30

7 Object "plotjuggler", at 0x100d673f7, in LuaCustomFunction::initEngine() + 839

6 Object "plotjuggler", at 0x100d6a056, in void sol::basic_reference::move_assign(sol::basic_reference&&) + 38

5 Object "plotjuggler", at 0x100dd93f8, in luaL_unref + 40

4 Object "plotjuggler", at 0x100db6fca, in lua_rawgeti + 90

3 Object "plotjuggler", at 0x100dcfd22, in luaH_getint + 162

2 Object "libsystem_platform.dylib", at 0x7fff203dfd7c, in _sigtramp + 28

1 Object "plotjuggler", at 0x100da321d, in backward::SignalHandling::sig_handler(int, __siginfo, void) + 13

0 Object "plotjuggler", at 0x100da327e, in backward::SignalHandling::handleSignal(int, __siginfo, void) + 62

zsh: segmentation fault ./plotjuggler

jmailloux commented 2 years ago

I tried this on an Ubuntu VM. Layout file is slightly different than what I posted above. I loaded the layout file. Plotjuggler hung this time. I tried loading a log file, then loading the layout file. Plotjuggler crashed Backtrace for this crash:

31 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffaee91697, in QEventLoop::exec(QFlags)

30 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffaeeedef3, in QEventDispatcherGlib::processEvents(QFlags)

29 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffadec3c53, in g_main_context_iteration

28 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffadec3bb3, in

27 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffadec3943, in g_main_context_dispatch

26 Object "/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5", at 0xffffab2e1e47, in

25 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffffaf2425b3, in QWindowSystemInterface::sendWindowSystemEvents(QFlags)

24 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffffaf267257, in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)

23 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffffaf26602f, in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)

22 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffaee92eaf, in QCoreApplication::notifyInternal2(QObject, QEvent)

21 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf84797f, in QApplication::notify(QObject, QEvent)

20 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf83e3fb, in QApplicationPrivate::notify_helper(QObject, QEvent)

19 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf89def3, in

18 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf89b553, in

17 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf846faf, in QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget, QWidget**, QPointer&, bool, bool)

16 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffaee92eaf, in QCoreApplication::notifyInternal2(QObject, QEvent)

15 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf847daf, in QApplication::notify(QObject, QEvent)

14 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf83e3fb, in QApplicationPrivate::notify_helper(QObject, QEvent)

13 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf87ff37, in QWidget::event(QEvent*)

12 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf925137, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)

11 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf924f6f, in

10 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf923af7, in

9 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffaf9238ef, in QAbstractButton::clicked(bool)

8 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffaeebfc5b, in QMetaObject::activate(QObject*, int, int, void**)

7 Object "plotjuggler", at 0xaaaadeafd5ff, in

6 Object "plotjuggler", at 0xaaaadeafbe87, in

5 Object "plotjuggler", at 0xaaaadeb349eb, in

4 Object "plotjuggler", at 0xaaaadeb3014f, in

3 Object "plotjuggler", at 0xaaaadeb83b1f, in

2 Object "plotjuggler", at 0xaaaadeb84337, in

1 Object "plotjuggler", at 0xaaaadebef997, in

0 Object "plotjuggler", at 0xaaaadebda798, in

Segmentation fault (Address not mapped to object [0x8]) Segmentation fault

crash layout and log.zip .

facontidavide commented 2 years ago

ok. First of all, the layout don't crash with latest version of PlotJuggler.

On the other hand, I can see a limitation of the Layout + Custom Series, that fails when one custom series depend on another, as in your case.

Let me see if I can fix the later issue.

facontidavide commented 2 years ago

Fix pushed

image

Let me know if you have still problems

jmailloux commented 2 years ago

@facontidavide , thanks for the patch. The first thing I did after opening PlotJuggler after I rebuilt it is try to open efficiency.xml (without loading a data file). It crashed. See below stack trace. Should I open another issue?

Stack trace (most recent call last):

31 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffff975f4ef3, in QEventDispatcherGlib::processEvents(QFlags)

30 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffff965cac53, in g_main_context_iteration

29 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffff965cabb3, in

28 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffff965ca943, in g_main_context_dispatch

27 Object "/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5", at 0xffff939e8e47, in

26 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffff979495b3, in QWindowSystemInterface::sendWindowSystemEvents(QFlags)

25 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffff9796e257, in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)

24 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffff9796d02f, in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)

23 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffff97599eaf, in QCoreApplication::notifyInternal2(QObject, QEvent)

22 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff97f4e97f, in QApplication::notify(QObject, QEvent)

21 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff97f453fb, in QApplicationPrivate::notify_helper(QObject, QEvent)

20 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff97fa4ef3, in

19 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff97fa2553, in

18 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff97f4dfaf, in QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget, QWidget**, QPointer&, bool, bool)

17 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffff97599eaf, in QCoreApplication::notifyInternal2(QObject, QEvent)

16 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff97f4edaf, in QApplication::notify(QObject, QEvent)

15 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff97f453fb, in QApplicationPrivate::notify_helper(QObject, QEvent)

14 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff97f86f37, in QWidget::event(QEvent*)

13 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff9802c137, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)

12 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff9802bf6f, in

11 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff9802aaf7, in

10 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffff9802a8ef, in QAbstractButton::clicked(bool)

9 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffff975c6c5b, in QMetaObject::activate(QObject*, int, int, void**)

8 Object "plotjuggler", at 0xaaaacf4f35ff, in

7 Object "plotjuggler", at 0xaaaacf4f1e87, in

6 Object "plotjuggler", at 0xaaaacf52c023, in

5 Object "plotjuggler", at 0xaaaacf5278a7, in

4 Object "plotjuggler", at 0xaaaacf57b757, in

3 Object "plotjuggler", at 0xaaaacf57bf6f, in

2 Object "plotjuggler", at 0xaaaacf5e85cf, in

1 Object "plotjuggler", at 0xaaaacf5d33bb, in

0 Object "plotjuggler", at 0xaaaacf5e172c, in

Segmentation fault (Address not mapped to object [0xaaa0675ffa29]) Segmentation fault (core dumped)

jmailloux commented 2 years ago

I then reopened plotjuggler, loaded log_12. Then loaded efficiency.xml. It crashed.

Stack trace (most recent call last):

31 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffb6cd5697, in QEventLoop::exec(QFlags)

30 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffb6d31ef3, in QEventDispatcherGlib::processEvents(QFlags)

29 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffb5d07c53, in g_main_context_iteration

28 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffb5d07bb3, in

27 Object "/lib/aarch64-linux-gnu/libglib-2.0.so.0", at 0xffffb5d07943, in g_main_context_dispatch

26 Object "/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5", at 0xffffb3125e47, in

25 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffffb70865b3, in QWindowSystemInterface::sendWindowSystemEvents(QFlags)

24 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffffb70ab257, in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)

23 Object "/lib/aarch64-linux-gnu/libQt5Gui.so.5", at 0xffffb70aa02f, in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*)

22 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffb6cd6eaf, in QCoreApplication::notifyInternal2(QObject, QEvent)

21 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb768b97f, in QApplication::notify(QObject, QEvent)

20 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb76823fb, in QApplicationPrivate::notify_helper(QObject, QEvent)

19 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb76e1ef3, in

18 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb76df553, in

17 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb768afaf, in QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget, QWidget**, QPointer&, bool, bool)

16 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffb6cd6eaf, in QCoreApplication::notifyInternal2(QObject, QEvent)

15 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb768bdaf, in QApplication::notify(QObject, QEvent)

14 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb76823fb, in QApplicationPrivate::notify_helper(QObject, QEvent)

13 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb76c3f37, in QWidget::event(QEvent*)

12 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb7769137, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)

11 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb7768f6f, in

10 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb7767af7, in

9 Object "/lib/aarch64-linux-gnu/libQt5Widgets.so.5", at 0xffffb77678ef, in QAbstractButton::clicked(bool)

8 Object "/lib/aarch64-linux-gnu/libQt5Core.so.5", at 0xffffb6d03c5b, in QMetaObject::activate(QObject*, int, int, void**)

7 Object "plotjuggler", at 0xaaaadeb0d5ff, in

6 Object "plotjuggler", at 0xaaaadeb0be87, in

5 Object "plotjuggler", at 0xaaaadeb46023, in

4 Object "plotjuggler", at 0xaaaadeb418a7, in

3 Object "plotjuggler", at 0xaaaadeb95757, in

2 Object "plotjuggler", at 0xaaaadeb95f6f, in

1 Object "plotjuggler", at 0xaaaadec025cf, in

0 Object "plotjuggler", at 0xaaaadebed3d0, in

Segmentation fault (Address not mapped to object [0x8]) Segmentation fault (core dumped)

facontidavide commented 2 years ago

I am sorry that you still have problems, but unfortunately I can not reproduce this on my side, therefore I can hardly find a solution.

The only thing that I noticed here in your backtrace is that there is not reference to PlotJuggler at all. I wonder if this is aproblem of binary compatibility (parts of the code compiled with a different QT versions), but I honestly have no idea.

Sorry

jmailloux commented 2 years ago

OK. Thanks. I'd be happy to run experiments if you had anything you wanted to try. Only other thing to note is I have an ARM based machine. I wonder if doing what I am doing is causing memory corruption. What is getting corrupted when you try to reproduce is not causing problems. What is getting corrupted when I try to reproduce causes a crash. I have a colleague who also see crashes in plotjuggler. He is running Windows on x86. I can see if he can reproduce the crash using the same reproduction steps I am using if that would help.

jmailloux commented 2 years ago

On MacOS, plotjuggler 3.2.0, if I load the xml, then the log, it crashes with this stack trace. libc++abi: terminating with uncaught exception of type std::out_of_range: unordered_map::at: key not found Stack trace (most recent call last):

2 Object "libsystem_platform.dylib", at 0x7fff203dfd7c, in _sigtramp + 28

1 Object "plotjuggler", at 0x1004f4f0d, in backward::SignalHandling::sig_handler(int, __siginfo, void) + 13

0 Object "plotjuggler", at 0x1004f4f72, in backward::SignalHandling::handleSignal(int, __siginfo, void) + 66

zsh: abort plotjuggler

If I load the log, then the xml, it doesn't crash. But if I then load another log, it crashes with the same stack trace.

facontidavide commented 2 years ago

Ok , this last piece of information give me some hint.... I wonder where this std::out_of_range: unordered_map::at: is coming from... I will investigate.

facontidavide commented 2 years ago

just to be sure: DO NOT USE 3.2.0. Use master only, compiled in debug mode by yourself.

Otherwise, it could be an issue I solved already and we are wasting time.

jmailloux commented 2 years ago

Got it. Definitely don't want to waste your time. The Linux crashes have all been from master that I compiled myself. The MacOS one was also from master, but from a while ago, that I compiled myself. I can update to latest on MacOS and try if that would help. Just to clarify - when you say compiled in debug mode - I compile by following the instructions on the github page. I don't do anything different.

facontidavide commented 2 years ago

Please compile like this

mkdir build; cd build
cmake -DCMAKE_BUILD_TYPE=Debug  ..
make -j

This should provide much more informative backtrace.

Aldo consider that loading the layout BEFORE the data is NOT expected to work properly. It MUST NOT crash, but it is not expected to magically work either.

jmailloux commented 2 years ago

OK. On the first try, the debug version on Ubuntu did not crash. :)

I will keep using it and report if it crashes.

jmailloux commented 2 years ago

OK. Got a crash after loading a different log:

==8886==ERROR: AddressSanitizer: heap-use-after-free on address 0xffff6799b380 at pc 0xaaaae1f4b284 bp 0xfffff89ec040 sp 0xfffff89ec060 READ of size 8 at 0xffff6799b380 thread T0

0 0xaaaae1f4b280 in std::__cxx11::list<PJ::PlotWidgetBase::CurveInfo, std::allocator >::begin() /usr/include/c++/9/bits/stl_list.h:942

#1 0xaaaae1f3f810 in PlotWidget::on_changeTimeOffset(double) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/plotwidget.cpp:907
#2 0xaaaae1d882cc in PlotWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jerrymailloux/dev/thirdparty/PlotJuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_plotwidget.cpp:235
#3 0xffff89d54bb8 in QMetaObject::activate(QObject*, int, int, void**) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x297bb8)
#4 0xaaaae1d8fc7c in MonitoredValue::valueChanged(double) /home/jerrymailloux/dev/thirdparty/PlotJuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_utils.cpp:130
#5 0xaaaae1e79390 in MonitoredValue::set(double) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/utils.h:23
#6 0xaaaae1e469c8 in MainWindow::updateTimeOffset() /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:2179
#7 0xaaaae1e4732c in MainWindow::updateDataAndReplot(bool) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:2234
#8 0xaaaae1e33220 in MainWindow::loadDataFromFile(PJ::FileLoadInfo const&) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:1493
#9 0xaaaae1e30e3c in MainWindow::loadDataFromFiles(QStringList) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:1342
#10 0xaaaae1e50b94 in MainWindow::on_pushButtonLoadDatafile_clicked() /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:2814
#11 0xaaaae1d8495c in MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jerrymailloux/dev/thirdparty/PlotJuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp:409
#12 0xaaaae1d8579c in MainWindow::qt_metacall(QMetaObject::Call, int, void**) /home/jerrymailloux/dev/thirdparty/PlotJuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp:493
#13 0xffff89d54c58 in QMetaObject::activate(QObject*, int, int, void**) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x297c58)
#14 0xffff8a7b88ec in QAbstractButton::clicked(bool) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x2438ec)
#15 0xffff8a7b8af4  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x243af4)
#16 0xffff8a7b9f6c  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x244f6c)
#17 0xffff8a7ba134 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x245134)
#18 0xffff8a714f34 in QWidget::event(QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x19ff34)
#19 0xffff8a6d33f8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x15e3f8)
#20 0xffff8a6dcdac in QApplication::notify(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x167dac)
#21 0xffff89d27eac in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x26aeac)
#22 0xffff8a6dbfac in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x166fac)
#23 0xffff8a730550  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x1bb550)
#24 0xffff8a732ef0  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x1bdef0)
#25 0xffff8a6d33f8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x15e3f8)
#26 0xffff8a6dc97c in QApplication::notify(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x16797c)
#27 0xffff89d27eac in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x26aeac)
#28 0xffff8a0fb02c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (/lib/aarch64-linux-gnu/libQt5Gui.so.5+0x10e02c)
#29 0xffff8a0fc254 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (/lib/aarch64-linux-gnu/libQt5Gui.so.5+0x10f254)
#30 0xffff8a0d75b0 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/lib/aarch64-linux-gnu/libQt5Gui.so.5+0xea5b0)
#31 0xffff7fcdbe44  (/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5+0x72e44)
#32 0xffff88d40940 in g_main_context_dispatch (/lib/aarch64-linux-gnu/libglib-2.0.so.0+0x51940)
#33 0xffff88d40bb0  (/lib/aarch64-linux-gnu/libglib-2.0.so.0+0x51bb0)
#34 0xffff88d40c50 in g_main_context_iteration (/lib/aarch64-linux-gnu/libglib-2.0.so.0+0x51c50)
#35 0xffff89d82ef0 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x2c5ef0)
#36 0xffff89d26694 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x269694)
#37 0xffff89d2eca8 in QCoreApplication::exec() (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x271ca8)
#38 0xaaaae1dfda7c in main /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/main.cpp:365
#39 0xffff896b808c in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x2408c)
#40 0xaaaae1d808c0  (/usr/local/bin/plotjuggler+0xd48c0)

0xffff6799b380 is located 192 bytes inside of 232-byte region [0xffff6799b2c0,0xffff6799b3a8) freed by thread T0 here:

0 0xffff8afb0b68 in operator delete(void*, unsigned long) (/lib/aarch64-linux-gnu/libasan.so.5+0xf0b68)

#1 0xffff89cb926c  (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x1fc26c)
#2 0xffff89cb9b98  (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x1fcb98)
#3 0xffff89cba0d8 in QSettings::QSettings(QObject*) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x1fd0d8)
#4 0xaaaae1de7ee8 in CurveTreeView::addItem(QString const&, QString const&, QString const&) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/curvetree_view.cpp:68
#5 0xaaaae1daf988 in CurveListPanel::addCurve(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/curvelist_panel.cpp:112
#6 0xaaaae1e30230 in MainWindow::importPlotDataMap(PJ::PlotDataMapRef&, bool) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:1277
#7 0xaaaae1e328e4 in MainWindow::loadDataFromFile(PJ::FileLoadInfo const&) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:1439
#8 0xaaaae1e30e3c in MainWindow::loadDataFromFiles(QStringList) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:1342
#9 0xaaaae1e50b94 in MainWindow::on_pushButtonLoadDatafile_clicked() /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:2814
#10 0xaaaae1d8495c in MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jerrymailloux/dev/thirdparty/PlotJuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp:409
#11 0xaaaae1d8579c in MainWindow::qt_metacall(QMetaObject::Call, int, void**) /home/jerrymailloux/dev/thirdparty/PlotJuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp:493
#12 0xffff89d54c58 in QMetaObject::activate(QObject*, int, int, void**) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x297c58)
#13 0xffff8a7b88ec in QAbstractButton::clicked(bool) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x2438ec)
#14 0xffff8a7b8af4  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x243af4)
#15 0xffff8a7b9f6c  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x244f6c)
#16 0xffff8a7ba134 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x245134)
#17 0xffff8a714f34 in QWidget::event(QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x19ff34)
#18 0xffff8a6d33f8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x15e3f8)
#19 0xffff8a6dcdac in QApplication::notify(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x167dac)
#20 0xffff89d27eac in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x26aeac)
#21 0xffff8a6dbfac in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x166fac)
#22 0xffff8a730550  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x1bb550)
#23 0xffff8a732ef0  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x1bdef0)
#24 0xffff8a6d33f8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x15e3f8)
#25 0xffff8a6dc97c in QApplication::notify(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x16797c)
#26 0xffff89d27eac in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x26aeac)
#27 0xffff8a0fb02c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (/lib/aarch64-linux-gnu/libQt5Gui.so.5+0x10e02c)
#28 0xffff8a0fc254 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (/lib/aarch64-linux-gnu/libQt5Gui.so.5+0x10f254)
#29 0xffff8a0d75b0 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/lib/aarch64-linux-gnu/libQt5Gui.so.5+0xea5b0)

previously allocated by thread T0 here:

0 0xffff8afaf5b8 in operator new(unsigned long) (/lib/aarch64-linux-gnu/libasan.so.5+0xef5b8)

#1 0xffff89c5c6d0 in QFileInfo::QFileInfo(QString const&) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x19f6d0)
#2 0xffff89cb9254  (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x1fc254)
#3 0xffff89cb9b98  (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x1fcb98)
#4 0xffff89cba0d8 in QSettings::QSettings(QObject*) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x1fd0d8)
#5 0xaaaae1de7ee8 in CurveTreeView::addItem(QString const&, QString const&, QString const&) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/curvetree_view.cpp:68
#6 0xaaaae1daf988 in CurveListPanel::addCurve(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/curvelist_panel.cpp:112
#7 0xaaaae1e30230 in MainWindow::importPlotDataMap(PJ::PlotDataMapRef&, bool) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:1277
#8 0xaaaae1e328e4 in MainWindow::loadDataFromFile(PJ::FileLoadInfo const&) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:1439
#9 0xaaaae1e30e3c in MainWindow::loadDataFromFiles(QStringList) /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:1342
#10 0xaaaae1e50b94 in MainWindow::on_pushButtonLoadDatafile_clicked() /home/jerrymailloux/dev/thirdparty/PlotJuggler/plotjuggler_app/mainwindow.cpp:2814
#11 0xaaaae1d8495c in MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jerrymailloux/dev/thirdparty/PlotJuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp:409
#12 0xaaaae1d8579c in MainWindow::qt_metacall(QMetaObject::Call, int, void**) /home/jerrymailloux/dev/thirdparty/PlotJuggler/build/plotjuggler_app/plotjuggler_autogen/EWIEGA46WW/moc_mainwindow.cpp:493
#13 0xffff89d54c58 in QMetaObject::activate(QObject*, int, int, void**) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x297c58)
#14 0xffff8a7b88ec in QAbstractButton::clicked(bool) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x2438ec)
#15 0xffff8a7b8af4  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x243af4)
#16 0xffff8a7b9f6c  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x244f6c)
#17 0xffff8a7ba134 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x245134)
#18 0xffff8a714f34 in QWidget::event(QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x19ff34)
#19 0xffff8a6d33f8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x15e3f8)
#20 0xffff8a6dcdac in QApplication::notify(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x167dac)
#21 0xffff89d27eac in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x26aeac)
#22 0xffff8a6dbfac in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x166fac)
#23 0xffff8a730550  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x1bb550)
#24 0xffff8a732ef0  (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x1bdef0)
#25 0xffff8a6d33f8 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x15e3f8)
#26 0xffff8a6dc97c in QApplication::notify(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Widgets.so.5+0x16797c)
#27 0xffff89d27eac in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/lib/aarch64-linux-gnu/libQt5Core.so.5+0x26aeac)
#28 0xffff8a0fb02c in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (/lib/aarch64-linux-gnu/libQt5Gui.so.5+0x10e02c)
#29 0xffff8a0fc254 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (/lib/aarch64-linux-gnu/libQt5Gui.so.5+0x10f254)

SUMMARY: AddressSanitizer: heap-use-after-free /usr/include/c++/9/bits/stl_list.h:942 in std::__cxx11::list<PJ::PlotWidgetBase::CurveInfo, std::allocator >::begin() Shadow bytes around the buggy address: 0x200fecf33620: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x200fecf33630: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x200fecf33640: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x200fecf33650: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x200fecf33660: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x200fecf33670:[fd]fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa 0x200fecf33680: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x200fecf33690: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x200fecf336a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x200fecf336b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x200fecf336c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==8886==ABORTING

facontidavide commented 2 years ago

I have found a pretty serious bug and (fingers crossed) this MIGHT be related to yours.

Can you try the latest main with 2ca9a91bd7788a5f7a8528826ef7d1c9fc39c349 ?

jmailloux commented 2 years ago

Hello @facontidavide, your changes seem to fix the crash. However, if I do the following: Load a log file (log_12 for example), then load the layout file, everything works fine. The graphs show up and so do the custom series. If I then load another log file (log_14), and click "Yes", I do want to remove previously loaded data, none of the graphs or custom series show up. I've attached the logs I am using and a screenshot of what I see after I try to load the second log.

jmailloux commented 2 years ago

logs.zip

jmailloux commented 2 years ago

Loading the log file, then the layout still crashes on MacOS.

Stack trace (most recent call last):

31 Object "CoreFoundation", at 0x7fff20491718, in __CFRunLoopRun + 897

30 Object "CoreFoundation", at 0x7fff20492d0a, in __CFRunLoopDoSources0 + 242

29 Object "CoreFoundation", at 0x7fff20492f94, in __CFRunLoopDoSource0 + 180

28 Object "CoreFoundation", at 0x7fff2049302c, in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17

27 Object "libqcocoa.dylib", at 0x114ef5f98, in qt_plugin_instance + 199080

26 Object "QtGui", at 0x10d24713b, in QWindowSystemInterface::sendWindowSystemEvents(QFlags) + 203

25 Object "QtGui", at 0x10d261bdf, in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 3615

24 Object "QtCore", at 0x10e2d12b6, in QCoreApplication::notifyInternal2(QObject, QEvent) + 166

23 Object "QtWidgets", at 0x10c47be02, in QApplication::notify(QObject, QEvent) + 466

22 Object "QtWidgets", at 0x10c47aa56, in QApplicationPrivate::notify_helper(QObject, QEvent) + 262

21 Object "QtWidgets", at 0x10c4d13de, in QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) + 4622

20 Object "QtWidgets", at 0x10c4d2ca5, in QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) + 10965

19 Object "QtWidgets", at 0x10c47b362, in QApplicationPrivate::sendMouseEvent(QWidget, QMouseEvent, QWidget, QWidget, QWidget**, QPointer&, bool, bool) + 898

18 Object "QtCore", at 0x10e2d12b6, in QCoreApplication::notifyInternal2(QObject, QEvent) + 166

17 Object "QtWidgets", at 0x10c47d944, in QApplication::notify(QObject, QEvent) + 7444

16 Object "QtWidgets", at 0x10c47aa56, in QApplicationPrivate::notify_helper(QObject, QEvent) + 262

15 Object "QtWidgets", at 0x10c4b3d0a, in QWidget::event(QEvent*) + 442

14 Object "QtWidgets", at 0x10c562e6c, in QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 268

13 Object "QtWidgets", at 0x10c561ca9, in QAbstractButton::isCheckable() const + 457

12 Object "QtWidgets", at 0x10c561e2f, in QAbstractButton::isCheckable() const + 847

11 Object "QtCore", at 0x10e30201d, in QMetaObject::activate(QObject, QMetaObject const, int, void**) + 3373

10 Object "plotjuggler", at 0x102b92eae, in MainWindow::qt_metacall(QMetaObject::Call, int, void**) + 78

9 Object "plotjuggler", at 0x102bd934e, in MainWindow::on_pushButtonLoadLayout_clicked() + 414

8 Object "plotjuggler", at 0x102bc2403, in MainWindow::loadLayoutFromFile(QString) + 8003

7 Object "plotjuggler", at 0x102c2418e, in LuaCustomFunction::xmlLoadState(QDomElement const&) + 30

6 Object "plotjuggler", at 0x102c231d7, in LuaCustomFunction::initEngine() + 839

5 Object "plotjuggler", at 0x102c25e36, in void sol::basic_reference::move_assign(sol::basic_reference&&) + 38

4 Object "plotjuggler", at 0x102c951d8, in luaL_unref + 40

3 Object "plotjuggler", at 0x102c72da0, in lua_rawgeti + 80

2 Object "libsystem_platform.dylib", at 0x7fff203dfd7c, in _sigtramp + 28

1 Object "plotjuggler", at 0x102c5effd, in backward::SignalHandling::sig_handler(int, __siginfo, void) + 13

0 Object "plotjuggler", at 0x102c5f05e, in backward::SignalHandling::handleSignal(int, __siginfo, void) + 62

zsh: segmentation fault ./plotjuggler

facontidavide commented 2 years ago

I still can't reproduce the issue in Lua, but I added something that you will like:

pj_reload-2021-11-01_16.06.41.zip

Loading a different file with almost the same data should work now and Custom curves are recalculated, as they should.

facontidavide commented 2 years ago

I am closing this because now it is a duplicate of other issues

lgkimjy commented 3 months ago

I have similar issue with this, while I tried to use the UDP streaming, plotjuggler crash after I click the start button. image

I tried with this solution, but it didn't solve my crash problem. @facontidavide, is there any other suspicious problem that I might be able to fix? I am currently using a Mac M1 Pro.