crash when switching dir while opening file

• Jan 6, 2017 - 11:25
Reported version
P2 - Medium
S1 - Blocker

I experience this with commit 73a2e6a1a. The issue must have been introduced at some point after 98e51d992, A package of that commit and older ones don't have that problem.
When I try to open a file and in the file browser click on a directory, the programm crashes immediately.

#0 0x00000000009b019d in Ms::readScore(Ms::MasterScore*, QString, bool) ()
#1 0x00000000009b433e in ()
#2 0x00000000009b45cd in Ms::MuseScore::extractThumbnail(QString const&) ()
#3 0x0000000000adb941 in Ms::ScorePreview::setScore(QString const&) ()
#4 0x0000000000b1ba99 in ()
#5 0x00007fffee6c10c9 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/
#6 0x00007ffff53ed485 in QFileDialog::currentChanged(QString const&) () at /usr/lib/
#7 0x00007ffff53f697e in QFileDialogPrivate::_q_currentChanged(QModelIndex const&) () at /usr/lib/
#8 0x00007ffff53fc9ed in () at /usr/lib/
#9 0x00007fffee6c10c9 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/
#10 0x00007fffee644efa in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () at /usr/lib/
#11 0x00007fffee645180 in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags) ()
at /usr/lib/
#12 0x00007ffff544b6ec in QAbstractItemView::mousePressEvent(QMouseEvent*) () at /usr/lib/
#13 0x00007ffff5491e87 in QTreeView::mousePressEvent(QMouseEvent*) () at /usr/lib/
#14 0x00007ffff524332f in QWidget::event(QEvent*) () at /usr/lib/
#15 0x00007ffff532ae1e in QFrame::event(QEvent*) () at /usr/lib/
#16 0x00007ffff5451e83 in QAbstractItemView::viewportEvent(QEvent*) () at /usr/lib/
#17 0x00007ffff54918dc in QTreeView::viewportEvent(QEvent*) () at /usr/lib/
#18 0x00007fffee695641 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/
#19 0x00007ffff51fb335 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/
#20 0x00007ffff520398d in QApplication::notify(QObject*, QEvent*) () at /usr/lib/
#21 0x00007fffee6958e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/
#22 0x00007ffff520203d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) ()
at /usr/lib/
#23 0x00007ffff525d0b6 in () at /usr/lib/
#24 0x00007ffff525fac3 in () at /usr/lib/
#25 0x00007ffff51fb35c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/
#26 0x00007ffff5202ad1 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/
#27 0x00007fffee6958e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/
#28 0x00007fffef53a663 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/
#29 0x00007fffef53c1e5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
at /usr/lib/
#30 0x00007fffef51a15b in QWindowSystemInterface::sendWindowSystemEvents(QFlags) () at /usr/lib/
#31 0x00007fffd8a8fdc0 in () at /usr/lib/
#32 0x00007fffeba03587 in g_main_context_dispatch () at /usr/lib/
#33 0x00007fffeba037f0 in () at /usr/lib/
#34 0x00007fffeba0389c in g_main_context_iteration () at /usr/lib/
#35 0x00007fffee6ea2bf in QEventDispatcherGlib::processEvents(QFlags) () at /usr/lib/
#36 0x00007fffee693d3a in QEventLoop::exec(QFlags) () at /usr/lib/
#37 0x00007ffff53e9777 in QDialog::exec() () at /usr/lib/
#38 0x00000000009a9b2d in Ms::MuseScore::getOpenScoreNames(QString const&, QString const&) ()
#39 0x00000000009aa5b2 in Ms::MuseScore::loadFiles() ()
#40 0x0000000000839479 in Ms::MuseScore::cmd(QAction*, QString const&) ()
#41 0x000000000083a891 in Ms::MuseScore::cmd(QAction*) ()
#42 0x0000000000b1cd45 in ()
#43 0x00007fffee6c10c9 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/
#44 0x00007ffff51f848f in QActionGroup::triggered(QAction*) () at /usr/lib/


I'm on Archlinux. It happens the moment when I click on a folder name.
I can compile the commit before later to see if it's really that one.

On some platforms MuseScore doesn't use the "Open File"-Dialog from the window manager/operating systems but uses its own implementation. This could be the reason for Jojo not experiencing the issue, as on Windows the dialog from the OS is used.

Can you verify the value of nativeDialogs in your .ini file? You can likely locate it as ~/.config/MuseScore/MuseScoreDevelopment.ini

> putting a breakpoint upon entering that function.

If you could instruct me exactly on how to do that, or send me the necessary code snippet to insert, I could maybe send you the debug output?

A breakpoint is a feature from a debugging environment, setting them entirely depends on the environment you use. If you're not familiar with them, this might be the point to leave further investigation to another developer.

Just one more question: I'm guessing that you'd get the same crash when clicking a directory in the "Save As…" dialog; can you verify this?

And for the time being, change the nativeDialogs=false into nativeDialogs=true might be a workaround for you?

Tags View Changes

Is it still actual? Needs to be checked with nativeDialog=false. I cannot reproduce on Windows 10, MuseScoreNightly-2018-04-06-2019-master-8bb019c and I couldn't find the mentioned *.ini file.

Severity S2 - Critical S1 - Blocker
Type Graphical (UI) Functional
Priority P1 - High
Regression No
Reproducibility Randomly
Workaround Yes

I've tried on Windows, but with useNativeDialogs set to false, like it is the default on Linux: can't get it to crash.

Lest close this. Feel free to reopen if you still can reproduce it.

Priority P1 - High P2 - Medium
Status needs info closed

I cannot reproduce this on Linux either. So indeed let's close it, if someone is able to reproduce it feel free to reopen.