MuseScore 3 cannot start with WDM-KS audio devices installed.
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Many
Severity
S1 - Blocker
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project
MuseScore3 do not start with a soundcard or an audio interface connected. MuseScore3 can only start with a -s
command line option, or with PortAudio disabled in preferences.
MuseScore2 works fine.
I have pulled and built gc73b148d1
from the repository and the issue remains existence. I got a crash log with an assertion failure:
Assertion failed!
Program: C:\Users\asus\Desktop\MuseScoreNightly\git\MuseScore\build.debug\mscore\MuseScore3.exe
File: src/hostapi/wdmks/pa_win_wdmks.c, Line 1061
Expression: FALSE
Searched over the internet I found that others also reported the assertion failure in other projects using PortAudio.
This has been reported several times in the forum and the issue tracker, all labeled with "needs info" since no one has found the exact problem causing the crash on start previously.
Please at least provide a workaround to temporarily disable WDM-KS support?
Fix version
3.0.1
Comments
Using -s is a workaround, as is using MuseScore 2, neither is a good one though...
Unfortunatly for PortAudio we're just using a DLL, not their source code to build it outselves, so a fix for this most probably needs to come from the folks at PortAudio/PulseAudio (?). Unless they already provide an option to disable WDM-KS support. Investigation needed
In reply to Using -s is a workaround, as… by Jojo-Schmitz
Currently, I am working with MuseScore3 and my audio interface with a workaround. I unplug the audio interface before opening MuseScore, then replug it after MuseScore finished the initialization. This bypassed the PortAudio initialization issue. To use the audio interface as the playback device, I set MIDI output of MuseScore preference to send playback via loopMIDI to an external VSTi. This is a little bit confusing but works perfectly for me.
In reply to Using -s is a workaround, as… by Jojo-Schmitz
Maybe trying to use a different PortAudio DLL (with WDM-KS enabled) would help? https://github.com/adfernandes/precompiled-portaudio-windows for example?
In reply to Maybe trying to use a… by dilon2001
Nope.
The ordinal 908 could not be located in the dynamic link library.
Maybe a recompile against the library is required?@dilon2001: Won't help, as that explicitly states to have WDM-KS enabled, we need it disabled as I understand
@Aean: did you (re)build the portaudio.lib (using dll2lib.bat)? MSVC seems to need that (MinGW does not).
In general: the portaudio.dll we use is antediluvian, from 2009 or even older (EDIT: this is the 32bit version) ... got copied accross to the dependencies since ages, never refreshed apparently. the once from the link above are at least 4 years younger, which still is way behind where PortAudio is now, their latest stable is from 2016, latest devel from today. But source only, can't find binaries
In reply to Nope. The ordinal 908 could… by Aean
Maybe yes. I can't locate the version number of the current portaudio.dll , and perhaps the PortAudio version provided in that link is somewhat old, but at least it seems to provide the whole pieces for a Visual Studio rebuild (of the PortAudio library itself I meant, instructions at https://github.com/adfernandes/precompiled-portaudio-windows/blob/maste…)
In reply to Won't help, as that… by Jojo-Schmitz
I just replaced a nightly built version, which I guess was built with MSVC. Now I tried with my personal, MinGW-built Debug version, still not working, but another assertion failure this time.
I cannot attach the full log file, the button doesn't react to me.
I believe that assert is having a different cause: not running MuseScore from the install directory, but from the build directory, so it doesn't find the (installed) workspace files
In reply to that assert is having a… by Jojo-Schmitz
So the issue seems solved..? I cannot get it started anywhere else... It keeps reporting various dynamic linkage errors. Could you tell me how could I validate if the issue has been solved or not?
In reply to So the issue seems solved..?… by Aean
@Aean, did you tried instead to run your compiled MuseScore from the install folder, aka clicking MuseScore.exe from the generated win32install/bin (for that, to generate the install folder, if you compiled a mingw debug build I think you need to do "a mingw32-make -f Makefile.mingw installdebug")? that's the reason of the other errors in your latest output I think)
In reply to @Aean, did you tried instead… by dilon2001
Thanks, I will try it.
How are you building? QtCreator/MinGW or MSVC? In any case you'd need to follow the instructions in the developers' handbook, wich does explain that you need to a) install and b) run from there.
In reply to @Aean, did you tried instead… by dilon2001
It works! The issue has been solved, MuseScore has started and made sounds through my audio interface. So you guys just need to replace the library linked against with that version provided by @dilon2001. Thanks for your assistance @dilon2001 and @Jojo-Schmitz!
In reply to It works! The issue has been… by Aean
Glad it worked but, please, could you provide us again with the debug output at the start of the MuseScore succesfull run, telling the portaudio version? (as you did above, "Debug: using PortAudio Version: PortAudio V19-devel (built May 26 2013 16:02:30) (C:\Users\asus\Desktop\MuseScoreNightly\git\MuseScore\mscore\pa.cpp:99, virtual bool Ms::Portaudio::init(bool))
Debug: No device selected. PortAudio detected 55 devices. Will use the default device (index 5). ")
In reply to Glad it worked but, please,… by dilon2001
Of course!
In reply to Of course! Debug: using… by Aean
Thanks! . Any chance you still have the debug log of the original (failing) MuseScore 3.0 nightly which crashed (with the assert)? . I just would like to check the portaudio version from that one
In reply to Thanks! . Any chance you… by dilon2001
I reproduced it, but it doesn't mention the version.
In reply to I reproduced it, but it… by Aean
Doh! many thanks anyway, Aean.
In reply to Thanks! . Any chance you… by dilon2001
Wait, I made it printed out by unplugging my audio interface...
In reply to Wait, I made it printed out… by Aean
Cool, got it, thanks!
I think then the developers would be so glad to take a look (check when was integrated as a dependency, etc.) over this PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4 , as it seems to have problems.
So for you "PortAudio V19.6.0-devel revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4" fails, but "PortAudio V19-devel (built May 26 2013 16:03:11)" or "PortAudio SVN r1891 (as of May 05, 2013)" works?
Latest Stable, "October 30, 2016, git commit 396fe4b6699ae929d3a685b3ef8a7e97396139a4". is 3 1/2 years newer...
Something is fishy here. Is https://github.com/adfernandes/precompiled-portaudio-windows/blob/maste… lying?
To try to sort this out:
the portaudio was updated when the build environment switched to MSVC for 64bit Windows.
The automated build started to use the dlls from: https://github.com/spatialaudio/portaudio-binaries which should be based on what in http://portaudio.com/download.html is called "the most current and stable release from the Git repository on October 30, 2016, git commit 396fe4b6699ae929d3a685b3ef8a7e97396139a4".
During lunch time today I tried to build this very same portaudio git commit with MSVC (while in that github repo they were cross-compiling with mxe). Attached you can find the resulting dll (64bit).
@ Aean : can you please try this dll and see if it works for your WDM-KS device?
In reply to So for you "PortAudio V19.6… by Jojo-Schmitz
Jojo, the user tried with the PortAudio embebbed in the nightly (and I suppose too, it's the same in the 3.0 final released recently) and it crashed with an assert.
Then he tried with another different portaudio version, the one in the link I gave above. Then it worked.
Exactly, what do you mean? I'm not an expert regarding SVN versions/builds/etc., but I'm just getting the suspect that the current portaudio as distributed with 3.0 has its problems regarding certain devices - and a logical thing (I think) would be to research since when it was integrated on the MuseScore 3.0 (nightlies , etc.). It's clear that starting the release of MuseScore 3.0 , there are a much more ample user base who can reveal more crearly obscure problems in their audio devices.
edit: well, @ABL clarified above, thanks!
In reply to To try to sort this out: the… by ABL
It works. @ABL.
@ABL: Ah! Good to know. Do you have a 32bit version of it too please?
OTH why didn't MuseScore 3.0 not work out of-the-box for @Aean? It should have had that DLL already, shouldn't it?
In reply to @ABL: Ah! Good to know. Do… by Jojo-Schmitz
DLL provided by @ABL have a file size of 598KB, DLLs shipped with nightly builds, shipped with official stable version and from compilation guide of developer handbook are 359KB. DLL provided by @dilon2001 is 187KB. These are three different versions.
OK, now I'm completly lost. Which version are we currently using, whioch are broken, which work and what should we be using?
And need it for 32bit too, preps for being able to provide a 32bit MuseScore as soon as AppVeyor supports Qt 5.12...
In reply to OK, now I'm completly lost… by Jojo-Schmitz
But I understood @ABL that the one we provide is from the same source as his?
In reply to The one provided by @ABL is… by Aean
Thanks Aean
...then this bug, it seems a MSVC/Visual Studio build issue-only, then, @ABL?? (bug caused by the cross recompiled dll binary from the external repository, the spatialaudio one) if so I'm so glad this just reduces the problem to a simple replace of dll in the the 3.0 (and nightly) downloads
In reply to But I understood @ABL that… by Jojo-Schmitz
Yes @Jojo-Schmitz, but that 359KB version (https://github.com/spatialaudio/portaudio-binaries) are compiled under a Debian system with a cross-compiling toolchain according to the github page. So it seems that cross-compiling is responsible for the issue.
OK, I see. Would still be nice to also get a working 32bit version (although I don't even know whether the existing one is broken in the same way or just much older, it is from 19th March 2009, at most, maybe even older)
Yes, I suspect as well that it could be a problem of the cross-compilation (MinGW compilation).
Here are the x64 and x86 libraries, with correct import libraries (the one in the previous attachment was not working). I tried to compile the x86 with backward compatibility for Windows Xp, but I could not test this 32bit library.
The 64bit library works in my environment: @ Aean can you please try this one as well? (I had to recompile it and change a couple of parameters, but I hope it will still work as the previous one)
In reply to Yes, I suspect as well that… by ABL
@ABL: I have tried the x64 one and it works fine. Cannot test the x86 one since Qt 5.12 didn't provide a 32-bit prebuilt bundle.
Apologize for my late response, it was the late night in my country.
In reply to I have tried the x64 one and… by Aean
@ Aean : thanks a lot for your help.
I quickly tried the 32bit dll by substituting the dll in MuseScore 2.3 installation "bin" folder and in my system it worked. So I assume it should work.
(MuseScore 2.3 was built with 32bit MinGW. Trying to do the same trick in a MSVC compiled MuseScore 3.0.1-dev apparently leads to an error message complaining that the dll is not the one it linked against. One more reason why I prefer MinGW instead of MSVC)
Now we simply have to wait for these dlls (and maybe also the updated header) to substitute the ones present in the current dependencies zip bundle, and the following Nightly build should work also for wdm/ks devices.
Once again, thank you very much for your help and commitment :-)
Changing the status because we have the patch, even if an official github PR cannot be created (the dependencies bundle is not hosted on github).
@Aean: Qt 5.12 does provide means to build a 32bit version, but only with MSVC (the official builds use MSVC, MinGW is not really supported anymore, even if it still works). For MinGW indeed it is 64bit only in 5.12 and 32bit only in 5.9
sorry, posts crossed
Similar/same problem reported in the fb group: https://www.facebook.com/groups/musescore/permalink/2966152576744374/
Ah, Churchorganist, long time no see.
In reply to To try to sort this out: the… by ABL
Hello, I tried to use the portaudio.dll you provided and I placed it under Musecore 3/bin, replacing the old one with it. But this resulted in an error which i attached below and MuseScore doesn't start at all.
Yes, that lib needs to get properly linked into MuseScore, at least for MSVC builds, see further up
It still is a regression and a blocker, and the workaround still is to use -s or using MuseScore 2
https://s3.amazonaws.com/utils.musescore.org/dependencies.7z updated
Updated dependencies.7z on S3: https://s3.amazonaws.com/utils.musescore.org/dependencies.7z
Forgive me, but some of this is a tad over my head. I'm having the same issue on two of my Windows 10 Machines, but are fully updated and running v3.0.1. How do I fix this?
By updating to MuseScore 3.0.1
@Cadence Point Music, are you sure it still doesn't work in 3.0.1?
In reply to @Cadence Point Music, are… by mike320
Yes, I never had 3.0 installed on my machine, I downloaded the stable 3.0.1 yesterday. I've also attempted to reinstall to no avail.
In reply to @Cadence Point Music, are… by mike320
Yes, I never had 3.0 installed on my machine, I downloaded the stable 3.0.1 yesterday. I've also attempted to reinstall to no avail.
Try to update your sound drivers?
In reply to Try to update your sound… by Jojo-Schmitz
My drivers did needed updating, but that did not solve the problem, I also tried -F and -w, only -s works.
I wonder why MuseScore3.exe doesn't see those DLLs then, sitting right next to it?
In reply to I wonder why MuseScore3.exe… by Jojo-Schmitz
I'm still having issues, should I make a new thread?
Automatically closed -- issue fixed for 2 weeks with no activity.