Open motorboyxx opened 4 years ago
Off the top of my head I can only think of two hypotheses:
createBuffers()
somehow results in PortAudio's internal state getting messed up, causing undefined behaviour.@motorboyxx Do you have other ASIO drivers installed? If so, can you try uninstalling them and see what happens? (You can also temporarily disable a driver by deleting its registry key under HKEY_LOCAL_MACHINE\SOFTWARE\ASIO
, and restore it afterwards.)
I do have ASIO4ALL installed as well. Disabling ASIO4ALL actually makes me able to launch with FlexASIO without crashing! Hopefully that will give you a clue!
Okay, that actually makes some sense. If Ableton is attempting to concurrently initialize multiple ASIO drivers, then one of them might grab exclusive access to the hardware while FlexASIO is trying to probe it. This is exactly something that ASIO4ALL might do, since it uses WDM-KS internally which does imply exclusive access.
I'm not quite sure how I could make FlexASIO more resilient to this issue. Maybe it could try to detect this situation, or repeatedly retry failing PortAudio calls to try to circumvent races. I wish host applications would refrain from concurrently initializing multiple ASIO drivers at the same time - that's really playing with fire.
Until I come up with a fix, my suggestion would be to avoid having multiple ASIO drivers installed at the same time when using Ableton.
Until I come up with a fix, my suggestion would be to avoid having multiple ASIO drivers installed at the same time when using Ableton.
Hi, I uninstalled every other ASIO drivers but still have a loud noise at Ableton startup. Do you have a definitive fix for this issue?
This issue is about Ableton crashes on initialization due to racing with other ASIO drivers. What you are describing (loud noises) seems like a completely different and unrelated problem. Can you open a new issue and attach a log?
For reference, there's a log at https://github.com/dechamps/FlexASIO/issues/83#issuecomment-674520269
I've never seen PortAudio fail on start() before and it looks like there's an error handling bug on the PortAudio side where the error doesn't percolate through to FlexASIO. Most likely PortAudio ends up in a messed up state and that's what's making the process crash.
AUDCLNT_E_DEVICE_INVALIDATED
is being returned fromIAudioClient::Start()
. Again that's the first time I see this error code. According to the relevant docs this means:Strangely, this error starts being returned earlier, during
canSampleRate()
probes. The last probe to succeed is for 96 kHz at 14:22:13.850, but then the next probe for 176.4 kHz at 14:22:13.880 fails withAUDCLNT_E_DEVICE_INVALIDATED
. It's really strange that it's failing all of a sudden in the middle of a probe sequence with no apparent reason. If it's the probes themselves that are causing issues, then #66 might end up fixing this problem as a side effect.