As an end-user running MuseScore 4.2.1-r1, when either I create a new file or open an existing file and make a change and attempt to save, I get a segmentation fault just after the Save dialog box (pointing to the file system) appears. Reproducible: Always Steps to Reproduce: 1. Open MuseScore. 2. Open a file (new or existing). 3. Make a change. 4. Type CTRL+S (or choose File > Save). 5. Select "Save to My Computer". Actual Results: Segmentation fault. With Address Sanitizer configured, the attached traceback is issued when running from a terminal window. Expected Results: The Save File dialog box is displayed, and the User is able to save the file. Address Sanitizer was configured as per http://wiki.gentoo.org/wiki/AddressSanitizer, and MuseScore was recompiled with it.
Created attachment 883514 [details] Traceback log
Created attachment 883515 [details] emerge --info
(In reply to William Sherwin from comment #1) > Created attachment 883514 [details] > Traceback log Did you have debugging symbols for dev-qt/* (no need for it for qtwebengine) and musescore? See https://wiki.gentoo.org/wiki/Debugging#Per-package.
(In reply to Sam James from comment #3) > (In reply to William Sherwin from comment #1) > > Created attachment 883514 [details] > > Traceback log > > Did you have debugging symbols for dev-qt/* (no need for it for qtwebengine) > and musescore? > > See https://wiki.gentoo.org/wiki/Debugging#Per-package. I did not: I will recompile and install them.
Are you using Wayland? If so, could you make sure you have dev-qt/qtgui[X] installed and try launching musescore with the QT_QPA_PLATFORM=xcb environment variable?
Created attachment 883570 [details] Updated Traceback
(In reply to Violet Purcell from comment #5) > Are you using Wayland? If so, could you make sure you have dev-qt/qtgui[X] > installed and try launching musescore with the QT_QPA_PLATFORM=xcb > environment variable? I am not: I'm still using X11. With the newer traceback, I actually got the Save File modal; after a few seconds, it vanished with the segfault.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79e1d8024e0c4da90c68a43fc09395663426741f commit 79e1d8024e0c4da90c68a43fc09395663426741f Author: Miroslav Šulc <fordfrog@gentoo.org> AuthorDate: 2024-08-04 11:24:30 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2024-08-04 11:24:41 +0000 media-sound/musescore: dropped obsolete 4.2.1-r2 Bug: https://bugs.gentoo.org/937234 Closes: https://bugs.gentoo.org/927888 Bug: https://bugs.gentoo.org/926328 Bug: https://bugs.gentoo.org/923217 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> media-sound/musescore/Manifest | 1 - .../files/musescore-4.2.0-unbundle-deps.patch | 119 ------------------ media-sound/musescore/metadata.xml | 1 - media-sound/musescore/musescore-4.2.1-r2.ebuild | 140 --------------------- 4 files changed, 261 deletions(-)
is 4.3.2 still affected?
(In reply to Miroslav Šulc from comment #9) > is 4.3.2 still affected? Yes, it is: I just tried it.
Your backtrace has: ``` 12:34:08.341 | INFO | main_thread | ActionsDispatcher::dispatch | try call action: file-save AddressSanitizer:DEADLYSIGNAL ================================================================= ==14887==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x55c21a44a744 bp 0x7fffe1d1b3f0 sp 0x7fffe1d1b170 T0) ==14887==The signal is caused by a READ memory access. ==14887==Hint: address points to the zero page. #0 0x55c21a44a744 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator->() const /usr/include/qt5/QtCore/qscopedpointer.h:118 #1 0x55c21a44a744 in QObject::isWidgetType() const /usr/include/qt5/QtCore/qobject.h:153 #2 0x55c21a44a744 in mu::ui::InteractiveProvider::raiseWindowInStack(QObject*) /var/tmp/portage/media-sound/musescore-4.2.1-r1/work/MuseScore-4.2.1/src/framework/ui/view/interactiveprovider.cpp:89 #3 0x55c21a44b958 in operator() /var/tmp/portage/media-sound/musescore-4.2.1-r1/work/MuseScore-4.2.1/src/framework/ui/view/interactiveprovider.cpp:69 #4 0x55c21a44b958 in call /usr/include/qt5/QtCore/qobjectdefs_impl.h:146 #5 0x55c21a44b958 in call<QtPrivate::List<QWindow*>, void> /usr/include/qt5/QtCore/qobjectdefs_impl.h:256 #6 0x55c21a44b958 in impl /usr/include/qt5/QtCore/qobjectdefs_impl.h:443 #7 0x7ff774ebb2f0 in QtPrivate::QSlotObjectBase::call(QObject*, void**) /var/tmp/portage/dev-qt/qtcore-5.15.12-r1/work/qtbase-everywhere-src-5.15.12/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398 [...] ``` Looking at https://github.com/musescore/MuseScore/blob/d514cf63ade94200648ee56b00a91572e7359df4/src/framework/ui/view/interactiveprovider.cpp#L88 ... ``` void InteractiveProvider::raiseWindowInStack(QObject* newActiveWindow) { if (!newActiveWindow || m_stack.isEmpty() || m_stack.top().window == newActiveWindow) { return; } for (int i = 0; i < m_stack.size(); ++i) { bool found = m_stack[i].window == newActiveWindow; if (m_stack[i].window->isWidgetType()) { found = newActiveWindow->objectName() == (m_stack[i].window->objectName() + "Window"); } [...] ``` Maybe try (with absolutely no awareness of what `m_stack` is) + if (m_stack[i].window->isWidgetType()) { - if (m_stack[i] && m_stack[i].window && m_stack[i].window->isWidgetType()) { I suppose the 'found' use of m_stack[i].window above may be problematic too.
(In reply to Sam James from comment #11) > > Maybe try (with absolutely no awareness of what `m_stack` is) > + if (m_stack[i].window->isWidgetType()) { > - if (m_stack[i] && m_stack[i].window && m_stack[i].window->isWidgetType()) uh, swap - and + otherwise, please run it under gdb and try see what goes on in that function (breakpoint on the loop and p m_stack first)
Heh: https://github.com/musescore/MuseScore/pull/13781#issuecomment-1397064657.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff577d6646e5b6f715f5641e2422b6ff8074b734 commit ff577d6646e5b6f715f5641e2422b6ff8074b734 Author: Miroslav Šulc <fordfrog@gentoo.org> AuthorDate: 2025-01-07 19:29:09 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2025-01-07 19:29:17 +0000 media-sound/musescore: dropped obsolete versions Bug: https://bugs.gentoo.org/926328 Closes: https://bugs.gentoo.org/684722 Closes: https://bugs.gentoo.org/937234 Closes: https://bugs.gentoo.org/923217 Closes: https://bugs.gentoo.org/820590 Closes: https://bugs.gentoo.org/937729 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> media-sound/musescore/Manifest | 3 - .../files/musescore-3.0.1-man-pages.patch | 29 ----- .../files/musescore-3.6.1-rename-audioitem.patch | 12 -- .../musescore-4.2.0-uncompressed-man-pages.patch | 29 ----- .../files/musescore-4.2.1-missing-headers.patch | 63 --------- .../files/musescore-4.3.2-unbundle-deps.patch | 48 ------- media-sound/musescore/metadata.xml | 6 - media-sound/musescore/musescore-3.6.2-r1.ebuild | 127 ------------------ media-sound/musescore/musescore-4.3.2.ebuild | 143 --------------------- media-sound/musescore/musescore-4.4.3.ebuild | 134 ------------------- 10 files changed, 594 deletions(-)