crash when switching dir while opening file
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.
backtrace:
#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/libQt5Core.so.5
#6 0x00007ffff53ed485 in QFileDialog::currentChanged(QString const&) () at /usr/lib/libQt5Widgets.so.5
#7 0x00007ffff53f697e in QFileDialogPrivate::_q_currentChanged(QModelIndex const&) () at /usr/lib/libQt5Widgets.so.5
#8 0x00007ffff53fc9ed in () at /usr/lib/libQt5Widgets.so.5
#9 0x00007fffee6c10c9 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#10 0x00007fffee644efa in QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&) () at /usr/lib/libQt5Core.so.5
#11 0x00007fffee645180 in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags) ()
at /usr/lib/libQt5Core.so.5
#12 0x00007ffff544b6ec in QAbstractItemView::mousePressEvent(QMouseEvent*) () at /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff5491e87 in QTreeView::mousePressEvent(QMouseEvent*) () at /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff524332f in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#15 0x00007ffff532ae1e in QFrame::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff5451e83 in QAbstractItemView::viewportEvent(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#17 0x00007ffff54918dc in QTreeView::viewportEvent(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#18 0x00007fffee695641 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#19 0x00007ffff51fb335 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#20 0x00007ffff520398d in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#21 0x00007fffee6958e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#22 0x00007ffff520203d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) ()
at /usr/lib/libQt5Widgets.so.5
#23 0x00007ffff525d0b6 in () at /usr/lib/libQt5Widgets.so.5
#24 0x00007ffff525fac3 in () at /usr/lib/libQt5Widgets.so.5
#25 0x00007ffff51fb35c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#26 0x00007ffff5202ad1 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#27 0x00007fffee6958e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#28 0x00007fffef53a663 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/libQt5Gui.so.5
#29 0x00007fffef53c1e5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
at /usr/lib/libQt5Gui.so.5
#30 0x00007fffef51a15b in QWindowSystemInterface::sendWindowSystemEvents(QFlags) () at /usr/lib/libQt5Gui.so.5
#31 0x00007fffd8a8fdc0 in () at /usr/lib/libQt5XcbQpa.so.5
#32 0x00007fffeba03587 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#33 0x00007fffeba037f0 in () at /usr/lib/libglib-2.0.so.0
#34 0x00007fffeba0389c in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#35 0x00007fffee6ea2bf in QEventDispatcherGlib::processEvents(QFlags) () at /usr/lib/libQt5Core.so.5
#36 0x00007fffee693d3a in QEventLoop::exec(QFlags) () at /usr/lib/libQt5Core.so.5
#37 0x00007ffff53e9777 in QDialog::exec() () at /usr/lib/libQt5Widgets.so.5
#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/libQt5Core.so.5
#44 0x00007ffff51f848f in QActionGroup::triggered(QAction*) () at /usr/lib/libQt5Widgets.so.5
Comments
Not that the connection would be obvious to me, but might this commit be involved?
https://github.com/musescore/MuseScore/commit/b5fdc2db3e17005ade6f88d41…
This was just 4 commits after my last working version.
So it happens with 73a2e6a, but not with 98e51d9 and you suspect b5fdc2d. That one does does deal with file names, so indeed might be related, e.g. if title is not (yet) set?
I can't get it to crash though, what step exactly? What OS?
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.
Difference between a native file dialog and the custom one?
Sorry, I don't know what you mean with custom file dialog?
I simply use Ctrl+O and the mouse. So I guess the custom file dialog and not the file browser if that's what you mean.
3af8fafbd, so the commit before b5fdc2d still works for me.
No, also b5fdc2d does not have that issue. It must have been introduced later...
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
I have nativeDialogs=false
Does it crash too when setting it to true?
No. Just wanted to report that ;) Doesn't crash when set to true.
However https://github.com/musescore/MuseScore/commit/168eee2d72c4114aade0538c4… is still good, strangely... (also with nativeDialogs=false)
Also 1b49b4c is still good. So must have been introduced by one of yesterday's commits...
Issue is introduced for me with https://github.com/musescore/MuseScore/commit/0b1aea952f9f870ef79f39899…
It's a monster commit 8^0 :^p
It did make changes to mscore/file.cpp however
But the path for your stacktrace (rendering a preview thumbnail upon selecting something in the dialog) didn't change as far as I can see currently…
It should end up in https://github.com/musescore/MuseScore/blob/master/mscore/file.cpp#L2144 when passed in a folder; can probably be found out by putting a breakpoint upon entering that function.
> 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
intonativeDialogs=true
might be a workaround for you?Ok, I see ;)
Yes, I get the same issue in the "Save As" dialog.
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.
Just set it in that ini file, it exists on Windows too, but of course in a different place. See https://musescore.org/en/handbook/revert-factory-settings for the location:
%APPDATA%\MuseScore\MuseScore2.ini
for the released versions,%APPDATA%\MuseScore\MuseScoreDevelopment.ini
for the development buildsI'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.
Let's ask @dmitrio95 to reproduce, he is on Linux. If not, we'll close it.
I cannot reproduce this on Linux either. So indeed let's close it, if someone is able to reproduce it feel free to reopen.