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

[Windows|macOS|Linux|BSD] - New -> Rename -> Remove instrument throws SIGSEGV #360

Closed
OPNA2608 opened this issue May 10, 2021 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@OPNA2608
Copy link
Member

OPNA2608 commented May 10, 2021

Checklist

  • I am reporting exactly 1 bug with this issue.
  • This bug hasn't already been reported.
  • This bug hasn't already been fixed in the latest development build.

Bug Description

Pressing the buttons to create a new instrument, rename the selected instrument and delete the instrument in that order causes a segmentation fault.

GDB backtrace:

Thread 1 "BambooTracker" received signal SIGSEGV, Segmentation fault.
0x00007ffff58da187 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007ffff58da187 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00005555555d5fab in AbstractInstrument::getName[abi:cxx11]() const (this=0x0) at instrument/instrument.hpp:52
#2  0x000055555566761d in MainWindow::finishRenamingInstrument (this=0x555555d29770) at gui/mainwindow.cpp:1629
#3  0x000055555565d6e0 in MainWindow::eventFilter (this=0x555555d29770, watched=0x555558f3bd60, event=0x7fffffffc0a0) at gui/mainwindow.cpp:853
#4  0x00007ffff5fe55bc in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff6d63815 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ffff6d6b104 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00005555558cb557 in QApplicationWrapper::notify (this=0x555555cc80a0, receiver=0x555558f3bd60, event=0x7fffffffc0a0) at gui/q_application_wrapper.cpp:35
#8  0x00007ffff5fe58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff6d68b71 in QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff6d9c7ef in QWidget::setFocus(Qt::FocusReason) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff6d9d198 in QWidget::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff6d9d0ab in QWidget::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff6d9d0ab in QWidget::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff6d9d0ab in QWidget::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff6d9d0ab in QWidget::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff6d9d0ab in QWidget::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff6fb66f7 in QAbstractItemView::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff6d9d0ab in QWidget::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff6d9d0ab in QWidget::focusNextPrevChild(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff6d9d551 in QWidgetPrivate::hide_helper() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff6da1da0 in QWidget::setVisible(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff6fab08c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff6fb33b9 in QAbstractItemView::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff6fee4ee in QListView::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff6faf96a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007ffff6014555 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007ffff5f80b1e in QAbstractItemModel::rowsAboutToBeRemoved(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007ffff5f87a7b in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007ffff6ff34b5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007ffff6ff35c3 in QListWidget::takeItem(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x0000555555748adb in RemoveInstrumentQtCommand::redo (this=0x7fffc4001060) at gui/command/instrument/remove_instrument_qt_command.cpp:59
#32 0x00007ffff70c8746 in QUndoStack::push(QUndoCommand*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00005555556641e9 in MainWindow::removeInstrument (this=0x555555d29770, row=0) at gui/mainwindow.cpp:1383
#34 0x00005555556739db in MainWindow::on_actionRemove_Instrument_triggered (this=0x555555d29770) at gui/mainwindow.cpp:2889
#35 0x00005555558cf267 in MainWindow::qt_static_metacall (_o=0x555555d29770, _c=QMetaObject::InvokeMetaMethod, _id=29, _a=0x7fffffffcd60) at moc_mainwindow.cpp:529
#36 0x00005555558cf920 in MainWindow::qt_metacall (this=0x555555d29770, _c=QMetaObject::InvokeMetaMethod, _id=29, _a=0x7fffffffcd60) at moc_mainwindow.cpp:641
#37 0x00007ffff6014619 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007ffff6d5d122 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007ffff6d5f80c in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007ffff6e5612b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007ffff6e5638d in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007ffff6f3501a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#43 0x00007ffff6da2048 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#44 0x00007ffff6f350b4 in QToolButton::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#45 0x00007ffff6d6383c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007ffff6d6b65f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00005555558cb557 in QApplicationWrapper::notify (this=0x555555cc80a0, receiver=0x555558f32ec0, event=0x7fffffffd2c0) at gui/q_application_wrapper.cpp:35
#48 0x00007ffff5fe58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#49 0x00007ffff6d6a632 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#50 0x00007ffff6dbd16b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#51 0x00007ffff6dbf7da in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#52 0x00007ffff6d6383c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#53 0x00007ffff6d6b104 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#54 0x00005555558cb557 in QApplicationWrapper::notify (this=0x555555cc80a0, receiver=0x555558f8ede0, event=0x7fffffffd740) at gui/q_application_wrapper.cpp:35
#55 0x00007ffff5fe58d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#56 0x00007ffff65a7583 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#57 0x00007ffff65a9055 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#58 0x00007ffff65802eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#59 0x00007fffecb86260 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#60 0x00007ffff2ade537 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#61 0x00007ffff2ade770 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#62 0x00007ffff2ade7fc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#63 0x00007ffff603e88f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#64 0x00007ffff5fe390a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#65 0x00007ffff5fec9b4 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#66 0x0000555555650fd0 in main (argc=1, argv=0x7fffffffdcb8) at main.cpp:67

How to reproduce

  1. Press New instrument button
  2. Press Rename instrument button
  3. Press Remove instrument button
  4. Crash

System Information

  • Operating System: Ubuntu 18.04.5
  • BambooTracker Version: v0.4.6 & latest master
  • Build Type: manually
@OPNA2608 OPNA2608 added the bug Something isn't working label May 10, 2021
@rerrahkr
Copy link
Member

Thanks for your report. It seems that the method removing the instrument is called before doing MainWindow::finishRenamingInstrument(). I'll try to change the priority of event.

@rerrahkr
Copy link
Member

@RaijinXBlade I fixed it in 288d8f1. Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants