Server boot error - cached broken synth compilation?

Hey all, I’m seeing a weird cache/compilation issue I’m hoping to get some help with! The problem happens every time I boot the server…


It seems like this began when I made a typo in my {...}.play block in a particular file (see here) – Out.ar(\0.kr(0), sig) instead of Out.ar(\out.kr(0), sig) to output the synth. Evaluating the file worked but produced this error message:

ERROR: Command line parse failed
ERROR: syntax error, unexpected INTEGER, expecting NAME or WHILE
  in interpreted text
  line 1 char 26:

  #{ arg out, random, lpf, 0;
                           ^
  	var	xC50A4A1A = Array.new(8);

From this point forward, everytime I restarted SCIDE and booted the server I saw this error message even in an environment with nothing loaded.

I tried to fix the typo in the file to see if that would help - first making it Out.ar(\out.kr(0), sig), which then produced this error:

ERROR: Function argument 'out' already declared in Interpreter:functionCompileContext

Then eventually remembering Out.ar() is not needed in a Function I just removed it and everything is great when evaluating that file!

However, I’m still getting this Function argument error message at every server reboot, similar to the problem before. It seems like there is some cached compilation of this function that I’m not able to clear out :confused: Anyone have tips on clearing this from my environment so I have a clean boot process? I’m on macOS if that helps!

Thanks and appreciate the help!

It’s probably a .scsyndef file still lurking in the synthdefs directory.

SynthDef.synthDefDir.openOS

… and look for recent files, and delete them.

It’s not entirely clear how you got to this point, though. { }.play does not create a scsyndef file. You would have to have .store-d a synthdef, or perhaps created a very large synthdef with the same \0.kr typo.

(The error occurs when the language is reading the scsyndef file, to keep a list of arguments for this synthdef.)

If all else fails, you can delete everything from the synthdef directory:

(
(SynthDef.synthDefDir +/+ "*.scsyndef").pathMatch.do { |path|
	File.delete(path);
};
)

hjh

1 Like

Thanks for the help! What’s interesting is that after many boots over many days, it seems to have finally fixed itself – and my synthdefDir as you mentioned is actually empty and I have not used .store.

But noted as the place to check if this happens in the future! I’m wondering if I had somehow started creating this as a SynthDef then switched over to a basic Function maybe?

In any case my issue seems resolved and I know how to clean things up in the future, so thanks again! :slight_smile: