MuseScore 4 Crash when headphones plugged in
Reported version
4.0
Type
Functional
Frequency
Many
Severity
S2 - Critical
Reproducibility
Always
Status
duplicate
Regression
Yes
Workaround
No
Project
Steps:
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
Comments
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 https://www.dropbox.com/s/cv4vvn3lutdezna/MuseScore-4.0.0.223622217-x86… (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 findMuseScore4.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 inMuseScore4Development
, while the official version puts them inMuseScore4
.)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 Hi! I'm one of the… 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 Thank you so much for your… 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: https://www.dropbox.com/s/086mhm28hlsv8dr/MuseScore-4.0.0.223640054-x86….
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!
Update: I have submitted a fix to be included in the next patch release, see https://github.com/musescore/MuseScore/pull/15698
In reply to Update: I have submitted a… by cbjeukendrup
I have found this problem happens for me when me laptop is on battery only. Windows 11 will also close musescore if it goes to sleep without the power plugged in. I am checking power settings but not finding anything to stop that from happening.
See https://github.com/musescore/MuseScore/issues/15029
See #337861: Disconnecting audio device / deactivating Bluetooth is able to kill MuseScore