MuseScore 4 Crash when headphones plugged in

• Dec 28, 2022 - 22:18
Reported version
S2 - Critical

1. Open MuseScore 4.0.0
2. Plug in or unplug headphones from 3.5mm headphone jack
Expected Behavior: MuseScore 4.0.0 does not crash when audio device is plugged in or unplugged from the computer
Actual Behavior: MuseScore 4.0.0 crashes when audio device is plugged in or unplugged from the computer
VOS: Windows 10 Version 2009
Arch.: x86_64
MuseScore version (64-bit): 4.0.0-223472200
revision: 5485621


Hi! I'm one of the developers and I'm trying to find the cause of these crashes. Unfortunately, I'm still not able to reproduce the problem on my own PC, so I'll need some help.

I have created a test version, that won't resolve the problem yet, but writes some detailed information to the log files, which should help tracking down where in the code the crash happens exactly. Basically, my question is to reproduce the crash with this test build, and then send me the resulting log files. To do this, could you please do the following:
1. Configure your audio devices in such way that MuseScore will crash.
2. Go to… (EDIT: Outdated link, see below for new one) and click "Download" in the top left corner (you don't need to log in).
3. The downloaded file is a zip file; unpack it.
4. Inside the resulting unpacked folder, you should find a subfolder called bin, and inside that folder you should find MuseScore4.exe. This is the file you need; double-click it to launch MuseScore.
5. It should crash again, just like the official version 4.0.0; or maybe it does load but playback doesn't work.
6. Now, in Windows Explorer, please go to %localappdata%\MuseScore\MuseScore4Development\logs to find the logs. (Note that this is a different location than for the logs of the official version: this test version puts the logs in MuseScore4Development, while the official version puts them in MuseScore4.)
7. Here you should find the logs from the last attempt to run the test version. Please upload them here; you may need to rename them to have .txt at the end, so that the forum lets you upload them.
8. When you are ready, you can simply remove the downloaded folder; with this procedure, nothing is installed on your computer, so you don't need to uninstall anything either.

It would also be useful if you could tell us some things about your headphones; do you know which sample rate they use? Do you have some kind of "spatial audio" mode enabled? For some people it helped to disable this.

Thanks in advance! Let me know if you have questions.

In reply to by cbjeukendrup

Thank you so much for your reply! With your new version of MuseScore 4 I was unable to replicate the crash as well. I bet this is something that has been fixed in a nightly. However, playback did stop working.

I found the log and renamed it a .txt file, however it still refuses to upload. In Windows file explorer it is simply [filename].txt, but when I try to upload it I get an error message which gives the file name as [filename].txt.log. Are there other troubleshooting steps you would like me to try to get it to upload, or another way you would like me to send the log to you?

I do not have a spatial audio setting on. My headphones are running at 16 bit 48000 Hz according to Windows sound settings.

Thank you so much for your help!

In reply to by frisknm

In Windows Explorer, in the "View" tab, there should be a button to show filename extensions. If you enable this, it will let you to change the extension properly.
If it still doesn't work, you can open the file with NotePad and just copy the contents and paste it here or in a new .txt file, or you can compress the log file into a zip file. Hope this helps!

Hi! I've created yet another test version:….

Would be great if you could download this, unzip it and run MuseScore.exe from the bin folder again; then check whether it starts correctly and whether playback works. Warning: I recommend that you turn your volume down when trying this version for the first time, because it might produce audio in the wrong format which causes a lot of noise (but won't be harmful for your system). And then I'm interested in the latest log file again; you can just open it with any text editor and copy the contents and paste it here.

Thanks in advance!