"MuseScore quit unexpectedly" when closing MuseScore 3.0.[12] on macOS

• Jan 15, 2019 - 17:58
Reported version
Ergonomical (UX)
S4 - Minor
PR created

When closing the newly released MuseScore 3.0.1 on macOS Mojave the user is confronted with the following dialog:

Screenshot 2019-01-15 at 18.50.57.png

Steps to reproduce:
1) Open MuseScore
2) Close "Start Center" Dialog
3) MuseScore -> Quit MuseScore (or Command - Q)

This dialog should not appear.

Attached also the crash report (report.txt)

Attachment Size
report.txt 105.9 KB


Title "MuseScore quit unexpectedly" when closing MuseScore 3.0.1 on macOS "MuseScore quit unexpectedly" when closing MuseScore 3.0.[12] on macOS

I can't reproduce the bug, it is probably specific to some interactions with other installed softwares.
In order to try to investigate, I managed to build a debug version of one of yesterday nightly build enabling also AddressSanitizer.
If someone experiencing the bug wants to help us in pinpointing the problem, here are the instructions:
- download the dmg here https://drive.google.com/open?id=1lPJVr-RBx6sW7r5ibYMobzcrXKpjQV9d and install MusescoreNightly-Debug in the Applications folder (as for a usual nightly build)
- open the terminal
- type the following commands:
cd ~/Desktop
/Applications/MuseScoreNightly-Debug.app/Contents/MacOS/mscore -d &>mscorelog.txt

- the application should launch in debug mode (it will be definitely slower than a usual MuseScore Nightly)
- reproduce the bug
- a txt file "mscorelog.txt" should have been created in the Desktop, please attach it to a comment in this thread.
Hopefully the log will contain the line number and stack trace for this bug, as well as some additional information of the state of MuseScore at the time of the bug, so we can try to fix it.
Thank you very much for your help.

Sorry that I couldn't answer before: thank you very much for the log file.
Unfortunately, it is not as revealing as I hoped. Maybe more information can be obtained if, before launching the debug mscore, the following environmental variable is defined:
export ASAN_OPTIONS=halt_on_error=0
so that the debug build tries to continue even if some memory errors are found.

I am still investigating this bug.
I found one bug using AddressSanitizer under Linux where it seems that at exit we are trying to delete a unique_ptr which aready atomatically got deleted, but I am not sure at all that that is this current bug.

Musescore 3.0.2 stopped suddenly in my MacBook Air. However, I had time enough to look at a few functions after downloading the latest version. Without knowing the purpose of the developers it is difficult to judge but this seems to be developing to wrong direction. E.g the chord symbol format is note restored when opening a previous score and the style format window is not available anymore with right click. And there are previously reported bugs...

Style format window not being available via right-click anymore is by design, that functionality has moved to the inspector.
Chord symbol style not being restored could be a bug, we'd need a score to reproduce
Your MuseScore having stopped has got nothing to do with the issue at hand here, which is that MuseScore crashes on exit on Mac, if it has a MIDI keyborad attached.

Cool! Thank you @ABL! In line with your root cause analysis: I just realized that in MuseScore 3.0.2 the crash does not happen, when I unplug all MIDI devices before launching MuseScore.

Regression Yes No

Unfortunately, I consistenly get the crash when closing MuseScore 3.0.2, whether or not I have any MIDI devices or other devices connected to my system. I'm running it on macOS High Sierra 10.13.6 (17G5019) on a MacBook Pro (15-inch, 2017).

I thought perhaps the issue was with my MIDI Settings in the Preference I/O tab, and made the following observations:
- I cannot deselect PortAudio, to deactivate MIDI Input
- for MIDI input, I can only pick one of three values: CoreMIDI,IAC Bus 1, CoreMIDI,IAC Bus 2 or CoreMIDI,Network Session 1
- for MIDI output, the initial value is blank; I can choose between blank and the same three values as for MIDI Input

Further, I was trying to see if using Toggle MIDI input on the UI made a difference, and observed:
- it is on by default
- if I turn it off and close the app, the app consistently crashes, and upon restarting the value is reset to on
- if I toggle the value off, and then toggle it back to on, the app immediately crashes

I wasn't sure if would be considered a regression since the issue was originally reported in 3.0.1 and I'm just confirming that I still see it in 3.0.2.
In any case, fwiw I just downloaded and confirmed the same behaviour on the most recent nightly build, MuseScoreNightly-2019-02-23-1156-master-383b6d9.dmg.