jamshark70. 19h
I’m finding that launching VCV Rack with unixCmd causes something to go wrong during SC’s shutdown sequence. One consequence is that port 57120 remains blocked after shutdown.
- Run my setup (which launches a2jmidid and Rack).
- After playing, close Rack manually.
- Reboot interpreter.
-
NetAddr.langPort
is now 57121. (The port will eventually be released, could be minutes or hours later.)
- Oh also at this point, if I try to quit the IDE, it will hang until I force kill it from the command line.
The phenomenon of incrementing the port number of currently-launched sclang is caused by the not-freed port number used by sclang when quitting sclang.
I had a similar problem:
I used the main laptop (MacBookPro) and four very slow laptops with a detachable keyboard. These four laptops were used as tablets to show sheet music to individual players. I wanted to control the sheet music page displayed on all five machines, so all sheet music on the screen can spontaneously synchronise since all devices are connected via Wi-Fi. I used SC-IDE only on the MBP; on other laptops, sclang was launched via command prompt using a batch file. It was not bad, but the four laptops were extremely slow and sometimes had to be forced to quit. The problem was that the port number used by the previous instance of sclang was not freed by the command prompt, and the newly-launched instance of sclang took a new port number; thus, I could not control the newly launched instance of sclang. It was impossible to resolve the problem using sclang or the command prompt window, which previously ran sclang. I tried to make a new command window from the previous command prompt window, but it could not also resolve the problem, and the port number of sclang was increasing further.
How did I fix the problem?
I had to quit sclang and the command prompt window manually. However, this manual way is very inefficient, so I automated this process by sending the OSC message for stopping sclang to Max on each machine; as soon as Max received the OSC message, it executed the batch file containing the following three lines:
taskkill /f /im scsynh.exe
taskkill /f /im sclang.exe
taskkill /f /im conhost.exe
I do not use Linux, but I think you could resolve the problem, in the same manner using pd or python. From my own experience, I could say that we should quit sclang from outside of sclang by using an application running entirely independently from the process related to sclang to reboot sclang without encountering the issue of an incremented port number. For example, if the first launching of sclang is done in a terminal window, even that terminal window itself should be destroyed before launching a new instance of sclang.