================================================================= ==2402==ERROR: AddressSanitizer: heap-use-after-free on address 0x61100164d640 at pc 0x0000032c6e14 bp 0x7fffacb0e890 sp 0x7fffacb0e888 READ of size 8 at 0x61100164d640 thread T0 #0 0x32c6e13 in Ms::Segment::~Segment() /home/antonio/MuseScore/libmscore/segment.cpp:190 #1 0x32c75f1 in Ms::Segment::~Segment() /home/antonio/MuseScore/libmscore/segment.cpp:194 #2 0x3062dc1 in Ms::Measure::~Measure() /home/antonio/MuseScore/libmscore/measure.cpp:189 #3 0x3062f8f in Ms::Measure::~Measure() /home/antonio/MuseScore/libmscore/measure.cpp:193 #4 0x3239527 in Ms::Score::~Score() /home/antonio/MuseScore/libmscore/score.cpp:328 #5 0x32b1bb8 in Ms::MasterScore::~MasterScore() /home/antonio/MuseScore/libmscore/score.cpp:4056 #6 0x32b1c1b in Ms::MasterScore::~MasterScore() /home/antonio/MuseScore/libmscore/score.cpp:4064 #7 0x11f61f9 in Ms::MuseScore::removeTab(int) /home/antonio/MuseScore/mscore/musescore.cpp:1943 #8 0x2627879 in Ms::MuseScore::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_musescore.cpp:798 #9 0x7f7fbcef7cee in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x294cee) #10 0x2659597 in Ms::ScoreTab::tabCloseRequested(int) /home/antonio/MuseScore/build.debug/mscore/moc_scoretab.cpp:186 #11 0x26580b7 in Ms::ScoreTab::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_scoretab.cpp:94 #12 0x7f7fbcef7cee in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x294cee) #13 0x7f7fc36e2290 in QTabBar::tabCloseRequested(int) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x2ec290) #14 0x7f7fbcef7cee in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x294cee) #15 0x7f7fc38c54d1 in QAbstractButton::clicked(bool) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x4cf4d1) #16 0x7f7fc36428c4 (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x24c8c4) #17 0x7f7fc3643623 (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x24d623) #18 0x7f7fc36437c3 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x24d7c3) #19 0x7f7fc358e307 in QWidget::event(QEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x198307) #20 0x7f7fc354c04b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x15604b) #21 0x7f7fc3550f0d in QApplication::notify(QObject*, QEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x15af0d) #22 0x7f7fbcecee7f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x26be7f) #23 0x7f7fc354fa32 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x159a32) #24 0x7f7fc35a95d9 (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x1b35d9) #25 0x7f7fc35ab6da (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x1b56da) #26 0x7f7fc354c04b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x15604b) #27 0x7f7fc3550487 in QApplication::notify(QObject*, QEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x15a487) #28 0x7f7fbcecee7f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x26be7f) #29 0x7f7fbddc797a in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Gui.so.5+0xf997a) #30 0x7f7fbddc9484 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Gui.so.5+0xfb484) #31 0x7f7fbddaa6a2 in QWindowSystemInterface::sendWindowSystemEvents(QFlags) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Gui.so.5+0xdc6a2) #32 0x7f7fad4b971f (/home/antonio/Qt/5.6/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5+0xad71f) #33 0x7f7fb9160e03 in g_main_context_dispatch (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x48e03) #34 0x7f7fb9161047 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x49047) #35 0x7f7fb91610eb in g_main_context_iteration (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x490eb) #36 0x7f7fbcf1e4e6 in QEventDispatcherGlib::processEvents(QFlags) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x2bb4e6) #37 0x7f7fbceccef9 in QEventLoop::exec(QFlags) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x269ef9) #38 0x7f7fbced4d9c in QCoreApplication::exec() (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x271d9c) #39 0x1274406 in main /home/antonio/MuseScore/mscore/musescore.cpp:5256 #40 0x7f7fbb68cec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) #41 0xb07798 (/usr/local/bin/mscore+0xb07798) 0x61100164d640 is located 0 bytes inside of 240-byte region [0x61100164d640,0x61100164d730) freed by thread T0 here: #0 0x7f7fc63ae6fa in operator delete(void*) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x956fa) #1 0x396adf1 in Ms::BarLine::~BarLine() /home/antonio/MuseScore/build.debug/libmscore/../../libmscore/barline.h:62 #2 0x369ef54 in Ms::RemoveElement::cleanup(bool) /home/antonio/MuseScore/libmscore/undo.cpp:1588 #3 0x3664aa2 in Ms::UndoCommand::cleanup(bool) /home/antonio/MuseScore/libmscore/undo.cpp:133 #4 0x366612a in Ms::UndoStack::~UndoStack() /home/antonio/MuseScore/libmscore/undo.cpp:196 #5 0x32b16f9 in Ms::MasterScore::~MasterScore() /home/antonio/MuseScore/libmscore/score.cpp:4060 #6 0x32b1c1b in Ms::MasterScore::~MasterScore() /home/antonio/MuseScore/libmscore/score.cpp:4064 #7 0x11f61f9 in Ms::MuseScore::removeTab(int) /home/antonio/MuseScore/mscore/musescore.cpp:1943 #8 0x2627879 in Ms::MuseScore::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_musescore.cpp:798 #9 0x7f7fbcef7cee in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x294cee) #10 0x2659597 in Ms::ScoreTab::tabCloseRequested(int) /home/antonio/MuseScore/build.debug/mscore/moc_scoretab.cpp:186 #11 0x26580b7 in Ms::ScoreTab::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_scoretab.cpp:94 #12 0x7f7fbcef7cee in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x294cee) #13 0x7f7fc36e2290 in QTabBar::tabCloseRequested(int) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x2ec290) #14 0x7f7fc38c54d1 in QAbstractButton::clicked(bool) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x4cf4d1) previously allocated by thread T0 here: #0 0x7f7fc63ae1ba in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x951ba) #1 0x2f82dd7 in Ms::Score::addSystemHeader(Ms::Measure*, bool) /home/antonio/MuseScore/libmscore/layout.cpp:1377 #2 0x2fc1224 in Ms::Score::collectSystem(Ms::LayoutContext&) /home/antonio/MuseScore/libmscore/layout.cpp:2952 #3 0x2fcdfd0 in Ms::Score::collectPage(Ms::LayoutContext&) /home/antonio/MuseScore/libmscore/layout.cpp:3354 #4 0x2fd5733 in Ms::Score::doLayout() /home/antonio/MuseScore/libmscore/layout.cpp:3520 #5 0x3721ad0 in Ms::Score::update() /home/antonio/MuseScore/libmscore/cmd.cpp:191 #6 0x1d5c1c6 in Ms::readScore(Ms::MasterScore*, QString, bool) /home/antonio/MuseScore/mscore/file.cpp:2091 #7 0x1d15348 in Ms::MuseScore::readScore(QString const&) /home/antonio/MuseScore/mscore/file.cpp:319 #8 0x1d14c40 in Ms::MuseScore::openScore(QString const&) /home/antonio/MuseScore/mscore/file.cpp:300 #9 0x1d1445f in Ms::MuseScore::loadFiles() /home/antonio/MuseScore/mscore/file.cpp:281 #10 0x124e05a in Ms::MuseScore::cmd(QAction*, QString const&) /home/antonio/MuseScore/mscore/musescore.cpp:4184 #11 0x12462a8 in Ms::MuseScore::cmd(QAction*) /home/antonio/MuseScore/mscore/musescore.cpp:4056 #12 0x2629e9c in Ms::MuseScore::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/antonio/MuseScore/build.debug/mscore/moc_musescore.cpp:825 #13 0x7f7fbcef7cee in QMetaObject::activate(QObject*, int, int, void**) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Core.so.5+0x294cee) #14 0x7f7fc354648e in QActionGroup::triggered(QAction*) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x15048e) #15 0x7f7fc3542951 in QAction::triggered(bool) (/home/antonio/Qt/5.6/gcc_64/lib/libQt5Widgets.so.5+0x14c951) SUMMARY: AddressSanitizer: heap-use-after-free /home/antonio/MuseScore/libmscore/segment.cpp:190 Ms::Segment::~Segment() Shadow bytes around the buggy address: 0x0c22802c1a70: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c22802c1a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c22802c1a90: 00 00 00 00 fa fa fa fa fa fa fa fa fa fa fa fa 0x0c22802c1aa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c22802c1ab0: 00 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa =>0x0c22802c1ac0: fa fa fa fa fa fa fa fa[fd]fd fd fd fd fd fd fd 0x0c22802c1ad0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c22802c1ae0: fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa fa 0x0c22802c1af0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c22802c1b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa 0x0c22802c1b10: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 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 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==2402==ABORTING