V2: on MAC a deadlock loading default patch with an active audio device at launch

let’s say that 1 out of 3 times loading the default patch stops after these 3 lines

[34m[8.334 info ../RackV2/src/rtaudio.cpp:119 openStream] e[0mOpening RtAudio CoreAudio device 1: USB Audio CODEC  (0 in, 2 out, 48000 sample rate, 256 block size)
e[34m[8.340 info ../RackV2/src/rtaudio.cpp:131 openStream] e[0mStarting RtAudio CoreAudio device 1
e[34m[8.460 info ../RackV2/src/rtaudio.cpp:141 openStream] e[0mOpened RtAudio CoreAudio device 1

the main thread is sstopped in a WriteLock precisely here

void Engine::addCable(Cable* cable) {
	WriteLock lock(internal->mutex);

and the APPLE.IOThread is blocked here:

Module* Engine::getModule(int64_t moduleId) {
	ReadLock lock(internal->mutex);

the full stack for the Main Thread is this

the stack for the IOThread is this one

I’ve been noticing the same thing on Windows lately as well (using head of v2 branch as I type this), hangning in RtAudio on startup once every 3 or 4 launches of Rack. I don’t think this was happening with the early v2’s, so perhaps something has changed in that library.

1 Like

Same here on Rack2 posted beta on Win10. Reloading patch after restart always works.

still happening in RACK release 219bbaf137d5dc70c96bd4206c3f8aad5524a81b

@marc_boule - could this possibly be related to that bug I am getting where a patch loads from template in the VST and the Audio Module is actually at 44.1 kHz sample rate even though it says it’s at 48 kHz (fixed by initialising the audio module).

I’m also getting an issue where when I save a template in Live that has VCV in it, although working fine when I save it, when I try and open that template again Live is crashing (and the template/project is therefore essentially lost… again, could possibly be related if it’s Rack crashing when opening and taking Live with it. Need to investigate this one a bit more though.

I don’t know, but for any crashes I’ve been having with Rack2 CE, I’ve been thinking that it’s cause by ABI incompatibilies with plugins vs Rack, and so I’ve recompiled everything from scratch and it seems to work.

For Rack2 SE, I couldn’t get the version I downloaded with our dev access to start up (it was always crashing), but I tried the idea of replacing the Fundamental plugin by one I built myself against the latest Rack CE (219bbaf1), and Rack2 SE is working fine now.

Since I didn’t see anyone mentioning this, and devs seem to have their Rack2 SE working, I thought it was just me, but come to think about it again, I think perhaps the Fundamental pack that came with Rack2 SE might not have been the correct version. I’m not sure about this, and not pointing out a fault, but those were my experience and thoughts. EDIT: after trying it again on another PC, it worked fine, so it’s probably not the case.


I don’t use Fundamental in my tests (only Core + nysthi)

Heretic! :stuck_out_tongue: