MIDIClient.init makes SuperCollider crash/freeze when called twice

Has there been an update in how SuperCollider handles its Midi connection client? I have had this issue since last night, where the MIDIClient.init method would make SuperCollider silently crash and an instance of SC would hang around until force-quit, not responding to input.

I usually use SCNvim, but the regular IDE is also behaving the same.

I have this helper class that I use to easily connect to a
16n faderbank, I’ve tried to figure out if that has something to do with anything, but no luck.

If you haven’t updated SC, then an update is unlikely to be the cause.

TL;DR answer is: avoid double-initializing.

// unsafe

// safer
if(MIDIClient.initialized.not) {

A valid argument could be made that MIDIClient should be doing this internally (though a counter to that might be that you may wish to force an init)… that would be an enhancement request on github.

Of course SC shouldn’t crash – however we don’t have full control over the MIDI layer. If the crash is inside the MIDI framework being used in your OS (the only way to know is to get a stack trace – Mac, Console.app; Linux, gdb; Windows, I don’t know), then the only fix on our side would be to prevent double-initialization (which you could implement in your helper class right now).