IDE not working properly

I just ran into an issue with the IDE that I can’t seem to figure out.

I was trying to do a Pbind with the default synth as a test and there was no output, so I opened the scope. It opened another window in the back with a subtractive synth GUI I was working on (that incidentally called the window to the front on evaluation). I got the beachball of death and couldn’t close the GUI window. I think it just closed itself eventually because it went away on its own.

I tried rebooting the interpreter because I couldn’t open the scope or node tree after that and NONE of the Pbinds I was testing were working anymore (I hadn’t changed them).

I tried quitting and reopening SC, but it wouldn’t play the Pbinds, the node tree and scopes will not open, if I try to dump the node tree, I get nothing in the post window even though I have Safety running at the very least.

I also reinstalled and at this moment, I cannot open the scopes or the node tree, I cannot dump the node tree, none of my Pbinds are working, I can’t click anything in the help browser. I tried evaluating this:

(
{SinOsc.ar(440, mul:0.5)}.play
)

but nothing showed in the post window, I got no sound, the number of ugens and synths stayed the same.

How do I fix this?

Sorry if this is “obvious” but if you reboot the interpreter you also need to restart the sound server or you will get no output.

I have no idea what happened on your system but consider restarting your computer and see if it makes a difference?

I tried that too but it didn’t help. I can’t quit the server after trying to evaluate code. I also then cannot use the help browser.

“Beachball” is Mac, right?

When something has crashed or hung, what to do next depends on the OS – would be helpful to confirm that it’s Mac.

Assuming Mac – I’d suggest a couple of troubleshooting steps (though I haven’t used Mac for a number of years so others might have better ideas).

  1. Reboot and do not let the OS relaunch apps from the prior session.
  2. Check the activity monitor and be absolutely sure there are no running instances of scide, sclang, scsynth, or supernova processes. If there are, force-kill them. At this point, we need to be 100% sure of starting clean, no stray processes.
  3. Launch the IDE. Now… What do you see in the post window? Based on above posts, we have no documentation of what actually happened. The startup sequence in SC is much more verbose than in other software – which means it’s really useful when things go wrong. So before doing anything else, copy/paste the startup sequence output.
  4. After a normal startup, there should be a welcome message. If you see this, try something simple like 1+1 expecting the post window result -> 2. Do not try complicated things like booting the server etc until you can at least get it to do math.
  • If this works, then try complicated things.
  • If not, then try a minimal setup. IDE preferences → interpreter, and make a new language config file with only default settings, no extensions. Also temporarily comment out everything in your startup file. Then quit/relaunch the IDE.

Also perhaps delete any SC-related plists. I think these are stored in a hidden folder ~/Library/Preferences (?) but, long time since I used Mac, not sure. Actually I’m not sure if SC uses plists but I’ve seen issues in Mac where the solution was to delete corrupted plist files, worth checking since this is a weird case.

hjh

1 Like

Yes, Mac.

I think one of my files is corrupted. I was trying to answer a post on here about Pbinds and made a simple Pbind with some environmental variables but now running that code will cause the problems I was describing. I can run other files now. Interpreter boot shows this:

compiling class library...
	Found 855 primitives.
	Compiling directory '/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary'
	Compiling directory '/Users/josiahsytsma/Library/Application Support/SuperCollider/Extensions'
	numentries = 835903 / 12415276 = 0.067
	5513 method selectors, 2252 classes
	method table size 13422984 bytes, big table size 99322208
	Number of Symbols 12313
	Byte Code Size 368750
	compiled 328 files in 0.72 seconds
compile done
localhost : setting clientID to 0.
internal : setting clientID to 0.
Class tree inited in 0.01 seconds


*** Welcome to SuperCollider 3.12.2. *** For help press Cmd-D.
SCDoc: Indexing help-files...
SCDoc: Indexed 1361 documents in 0.61 seconds

Cannot boot server after trying to run anything related to the code I’ve linked to. I can run Pbinds from the help browser, but if I try to run the code I posted, things start to break down. If I open the file I wrote it in, things start to break down. If I try to make another code that basically does the same thing, things start to break down.

I’m just going to avoid that for right now. It’s really strange. This works just fine:

(
p = Pbind(
	\dur, 0.33,
	\midinote, Prand((57..70), inf)
).play
)

But if I try to run that code, the server doesn’t boot or if it’s already booted, it basically freezes. Nothing in the post window. All of the activity in the bottom right ceases and the help browser, scopes, node tree, etc. stop working.
It does math when I open it. It actually does a lot, but something about that particular code, it now really does not like. It worked earlier. Not sure what this is about.

I did remove the .plst file and I tried RootNode.new(s) because I copied some code earlier that accessed the root node and that may have caused the issue, but I’m not sure.

At this point I can at least use SuperCollider, but anything related to that code I’ve linked to above is going to really mess things up. It’s a pretty benign bit of code too…

If the interpreter is working, and then you run something, and then later commands are unresponsive, this suggests that the “something” is going into an infinite loop.

The linked code has a problem.

(
var ghosts = [~inky, ~blinky, ~pinky, ~clyde];
var pacFamily = [~pacman, ~mrsPacman];
var everyone = [~inky, ~blinky, ~pinky, ~clyde, ~pacman, ~mrsPacman];

~inky=[0,3,7];
~blinky=[0,4,7];
~pinky=[0,2,5];
~clyde=[0,3,5];
~pacman=[0,5,10,15];
~mrsPacman=[0,4,7,11];

p = Pbind(
	\instrument, \default,
	\dur, 0.3,
	\midinote, Pn(Pshuf(ghosts)+60)
);

p.play
)

The ghosts array is being constructed before the environment variables are populated. So ghosts is [nil, nil, nil, nil].

Variables are not retroactive in SC! [x] does not mean “create an array that refers to a future value of x” – it means “look up x’s value right now and put this into an array, and the array will not change even if x changes later.”

So Pshuf(ghosts) exits immediately, and Pn repeats this immediate exit infinitely.

It’s unfortunate that this took you down a rabbit hole, but it’s a straightforward infloop case.

hjh