Ever since I started using SC 4 years ago I have had a recurring problem quitting code (not my own code) with command + period. Sometimes this is the case for very basic examples from the helpfiles, typically a Pbind not assigned to a variable or if I accidentally overwrite the reference to the Pbind. I does not happen every time but has happened many many times (maybe 100 times) over the years - only solution is to recompile the library as just quitting the server means loads of SynthDef not found errors which is unsuprising in itself. I have not done any thorough testing of the issues yet, first I want to hear if other users have had similar experiences.
In my own code I usually have something like
CmdPeriod.doOnce{ f[\shutdown].() };
Where f[\shutdown] is a cleanup code and as the last line of the shutdown func I have
CmdPeriod.removeAll
It is possible that the described behaviour only happens after I have shut down my own code and thus invoked the CmdPeriod.doOnce…CmdPeriod.removeAll method, but I am not sure. Latest example was trying to run @smoge’s code from this thread, where I was again unable to stop the code with command period. I have always assumed that CmdPeriod.removeAll only removes stuff I have assigned myself without messing with the basic workings of Cmd + Period - is that true?
I have used several official SC releases over the 4 years (never develop branches) always from the precompiled packages and also several generations of OSX - same behaviour.
Any thoughts?