musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.1k stars 2.62k forks source link

Program crashes due to WASAPI Audio Client Error #16575

Closed RoeiMeiri9 closed 1 year ago

RoeiMeiri9 commented 1 year ago

Issue type

Crash or freeze

Bug description

When opening MuseScore, it crashes. The error on the logs are as follows: 2023-02-27T21:09:05.249 | ERROR | 18988 | WasapiAudioClient | setStateAndNotify: 2023-02-27T21:09:05.249 | ERROR | 18988 | WasapiAudioClient | setStateAndNotify: 2023-02-27T21:09:05.249 | ERROR | 8784 | WasapiAudioClient | setStateAndNotify:

The full log is attached here: MuseScore_230227_210904.log

Steps to reproduce

  1. Open MuseScore.
  2. If you're lucky enough, WASAPI will crash MuseScore.

Screenshots/Screen recordings

No response

MuseScore Version

4.0.2

Regression

Yes, this used to work in Musescore 3.x and now is broken

Operating system

Windows 11

Additional context

Log file attached here too: MuseScore_230227_210904.log

Specs:

Also have Sibelius, Cubase, and ASIO-4ALL installed on my computer, alongside many others.

LAST VERSION THAT WORKED: This is a bit complicated since I can build MuseScore right now and it will work fine, using your tutorial. Also, back in April of 2021 MuseScore nightly build stopped working for me, and now they do work.

My uneducated guess is that the errors have something to do with how you compile MuseScore since this is the only factor I could think of that I can change and would make any difference at all.

cbjeukendrup commented 1 year ago

The way we compile MuseScore is in fact just using CMake... and there aren't many possibilities for discrepancies. The only relevant difference that I can think of right now, is the SDK version. It's unclear to me what SDK version is used on GitHub CI, but which version have you installed on your machine?

Tantacrul commented 1 year ago

@cbjeukendrup - I'm unclear if this should be added as a required fix for 4.0.2 or not? If it should be can you add it?

cbjeukendrup commented 1 year ago

I don't think we should make it a requirement anymore, simply because the chance that we can find the problem within a reasonable amount of time is very small (no-one of us can even reproduce it). And the previous fix for this problem has already fixed it for a lot of people, so the situation has already improved a lot.

cbjeukendrup commented 1 year ago

@RmGkAppDev Just to be sure that wasapi is really the cause: do you have any VST plugins on your computer? Maybe those are the cause of the crash. That might also explain that you don't have the crash in your self-built version: by default, it does not build VST support.

Also, if it's true that the last version that worked is from April 2021, then it can't be wasapi, because wasapi was introduced much later, like November 2022.

If it's indeed caused by VST plugins, then after each crash, the problematic VST plugin is disabled, so if you try often enough, the crash should stop happening.

RoeiMeiri9 commented 1 year ago

@RmGkAppDev Just to be sure that wasapi is really the cause: do you have any VST plugins on your computer? Maybe those are the cause of the crash. That might also explain that you don't have the crash in your self-built version: by default, it does not build VST support.

Also, if it's true that the last version that worked is from April 2021, then it can't be wasapi, because wasapi was introduced much later, like November 2022.

If it's indeed caused by VST plugins, then after each crash, the problematic VST plugin is disabled, so if you try often enough, the crash should stop happening.

Well, it could be. I will update soon

RoeiMeiri9 commented 1 year ago

Well, you're right! it was the vst3!