Booting the server reliably

Every now and then I find myself in a situation where starting the server doesn’t work reliably. I started to try to isolate these circumstances, which is not always easy. But here is one case, which I can reproduce reliably in SC 3.11.2 on Linux and macOS. The first code block works when run the first time. After a recompile, the same block doesn’t work, i.e. the server is never booted.

Am I missing something here?

( // works the first time

Server.default.boot(startAliveThread: false);
Server.default.doWhenBooted({
	{ SinOsc.ar([200, 202], 0, 0.1) }.play(Server.default);
});

)

// recompile class library now

( // now this fails

Server.default.boot(startAliveThread: false);
Server.default.doWhenBooted({
	{ SinOsc.ar([200, 202], 0, 0.1) }.play(Server.default);
});

)

I don’t have an answer but I can confirm this also happens on windows 10 and add that if I run the second bit of code (no sound, no server boot) followed by

s.quit;
s.boot;

the server boots and the sound starts (!)

Thank you. This also works on Linux and macOS.

The server boot process control could arguably be more reliable in general.

While I don’t know why exactly this happens, for me server booting seems to work reliably if with startAliveThread: true (macOS)

Marcin

Yes, the same for me on Linux and macOS. Thank you! Gerhard