===startCmd() UndoStack::beginMacro 0x6020002f9270, UndoStack 0x603000719140 MuseScore::changeState: STATE_TEXT_EDIT disable synth control 0x6170000eee80 enterState 0x6170000eee80 exitState Score(0x61a00017d680)::removeElement 0x6120006769c0(Text) parent 0x613000f3e4c0(TBox) MeasureBase(0x613000f3e4c0)::remove(Text,0x6120006769c0) not found ===endCmd() 2 UndoStack::endMacro 0 MuseScore::changeState: STATE_NORMAL disable synth control 0x6170000eee80 enterState 0x6170000eee80 exitState MuseScore::changeState: STATE_NORMAL disable synth control 0x6170000eee80 enterState MuseScore::changeState: STATE_NORMAL disable synth control MuseScore::changeState: STATE_NORMAL disable synth control MuseScore::changeState: STATE_DISABLED ================================================================= ==5729==ERROR: AddressSanitizer: heap-use-after-free on address 0x6120006769c0 at pc 0x186e7d2 bp 0x7fff4cfb6db0 sp 0x7fff4cfb6da8 READ of size 8 at 0x6120006769c0 thread T0 #0 0x186e7d1 in Ms::Element::name() const /home/antonio/MuseScore/libmscore/element.cpp:235 #1 0x1b72106 in Ms::RemoveElement::cleanup(bool) /home/antonio/MuseScore/libmscore/undo.cpp:1645 #2 0x1b63894 in Ms::UndoCommand::cleanup(bool) /home/antonio/MuseScore/libmscore/undo.cpp:130 #3 0x1b64080 in Ms::UndoStack::~UndoStack() /home/antonio/MuseScore/libmscore/undo.cpp:197 #4 0x19cf2bb in Ms::Score::~Score() /home/antonio/MuseScore/libmscore/score.cpp:427 #5 0x19cf6bd in Ms::Score::~Score() /home/antonio/MuseScore/libmscore/score.cpp:431 #6 0xc41a8c in Ms::MuseScore::removeTab(int) /home/antonio/MuseScore/mscore/musescore.cpp:1932 #7 0x152ba30 in Ms::MuseScore::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_musescore.cpp:783 #8 0x7f8e9698ae79 in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x308e79) #9 0x153e25a in Ms::ScoreTab::tabCloseRequested(int) /home/antonio/MuseScore/build.debug/mscore/moc_scoretab.cpp:171 #10 0x153d813 in Ms::ScoreTab::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_scoretab.cpp:93 #11 0x7f8e9698ae79 in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x308e79) #12 0x7f8e93f4fbd0 in QTabBar::tabCloseRequested(int) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x2fbbd0) #13 0x7f8e9698ae79 in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x308e79) #14 0x7f8e94159fe1 in QAbstractButton::clicked(bool) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x505fe1) #15 0x7f8e93ead852 (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x259852) #16 0x7f8e93eae169 (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x25a169) #17 0x7f8e93eae373 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x25a373) #18 0x7f8e93dea23b in QWidget::event(QEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x19623b) #19 0x7f8e93dae8f3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x15a8f3) #20 0x7f8e93db2070 in QApplication::notify(QObject*, QEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x15e070) #21 0x7f8e96958c83 in QCoreApplication::notifyInternal(QObject*, QEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x2d6c83) #22 0x7f8e93db0f87 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x15cf87) #23 0x7f8e93e05386 (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x1b1386) #24 0x7f8e93e07e77 (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x1b3e77) #25 0x7f8e93dae8f3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x15a8f3) #26 0x7f8e93db2505 in QApplication::notify(QObject*, QEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Widgets.so.5+0x15e505) #27 0x7f8e96958c83 in QCoreApplication::notifyInternal(QObject*, QEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x2d6c83) #28 0x7f8e95fef1d6 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Gui.so.5+0xee1d6) #29 0x7f8e95fefc64 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Gui.so.5+0xeec64) #30 0x7f8e95fd4a87 in QWindowSystemInterface::sendWindowSystemEvents(QFlags) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Gui.so.5+0xd3a87) #31 0x7f8e835bfbdf (/home/antonio/Qt5.4.0/5.4/gcc_64/plugins/platforms/libqxcb.so+0xb2bdf) #32 0x7f8e8d446e03 in g_main_context_dispatch (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x48e03) #33 0x7f8e8d447047 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x49047) #34 0x7f8e8d4470eb in g_main_context_iteration (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x490eb) #35 0x7f8e969b3553 in QEventDispatcherGlib::processEvents(QFlags) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x331553) #36 0x7f8e96956eaa in QEventLoop::exec(QFlags) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x2d4eaa) #37 0x7f8e9695bdc4 in QCoreApplication::exec() (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x2d9dc4) #38 0xc62b98 in main /home/antonio/MuseScore/mscore/musescore.cpp:5026 #39 0x7f8e8ee3eec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) #40 0x9cbdc8 (/usr/local/bin/mscore+0x9cbdc8) 0x6120006769c0 is located 0 bytes inside of 272-byte region [0x6120006769c0,0x612000676ad0) freed by thread T0 here: #0 0x7f8e97573517 in operator delete(void*) (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x55517) #1 0xa47c4b in Ms::Text::~Text() /home/antonio/MuseScore/build.debug/libmscore/../../libmscore/text.h:226 #2 0x1adc93f in Ms::TBox::~TBox() /home/antonio/MuseScore/libmscore/textframe.cpp:44 #3 0x1adc97f in Ms::TBox::~TBox() /home/antonio/MuseScore/libmscore/textframe.cpp:45 #4 0x19ceac0 in Ms::Score::~Score() /home/antonio/MuseScore/libmscore/score.cpp:413 #5 0x19cf6bd in Ms::Score::~Score() /home/antonio/MuseScore/libmscore/score.cpp:431 #6 0xc41a8c in Ms::MuseScore::removeTab(int) /home/antonio/MuseScore/mscore/musescore.cpp:1932 #7 0x152ba30 in Ms::MuseScore::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_musescore.cpp:783 #8 0x7f8e9698ae79 in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x308e79) previously allocated by thread T0 here: #0 0x7f8e9757309f in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.1+0x5509f) #1 0x1adc5b2 in Ms::TBox::TBox(Ms::Score*) /home/antonio/MuseScore/libmscore/textframe.cpp:37 #2 0x1879d60 in Ms::Element::create(Ms::Element::Type, Ms::Score*) /home/antonio/MuseScore/libmscore/element.cpp:1279 #3 0x1865281 in Ms::Score::insertMeasure(Ms::Element::Type, Ms::MeasureBase*, bool) /home/antonio/MuseScore/libmscore/edit.cpp:2367 #4 0xa038ca in Ms::ScoreView::cmdInsertMeasure(Ms::Element::Type) /home/antonio/MuseScore/mscore/scoreview.cpp:5154 #5 0x9e7ffa in Ms::ScoreView::cmd(QAction const*) /home/antonio/MuseScore/mscore/scoreview.cpp:2895 #6 0xc5bf11 in Ms::MuseScore::cmd(QAction*, QString const&) /home/antonio/MuseScore/mscore/musescore.cpp:4263 #7 0xc58262 in Ms::MuseScore::cmd(QAction*) /home/antonio/MuseScore/mscore/musescore.cpp:3903 #8 0x152c5c3 in Ms::MuseScore::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_musescore.cpp:810 #9 0x7f8e9698ae79 in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5+0x308e79) SUMMARY: AddressSanitizer: heap-use-after-free /home/antonio/MuseScore/libmscore/element.cpp:235 Ms::Element::name() const Shadow bytes around the buggy address: 0x0c24800c6ce0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c24800c6cf0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa 0x0c24800c6d00: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x0c24800c6d10: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c24800c6d20: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa =>0x0c24800c6d30: fa fa fa fa fa fa fa fa[fd]fd fd fd fd fd fd fd 0x0c24800c6d40: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c24800c6d50: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa 0x0c24800c6d60: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c24800c6d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c24800c6d80: 00 00 00 00 00 00 00 00 00 00 00 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Contiguous container OOB:fc ASan internal: fe ==5729==ABORTING