.plot method not working anymore

My plot method has suddenly stopped working.
I get the error message: ^^ The preceding error dump is for ERROR: Message ‘use’ not understood.
RECEIVER: nil

Anybody know how to fix?

code sample of how you are trying to use it, please?

This works for me:
1000.collect({arg i; i * 1.0.rrand(0.0)}).plot

1 Like

Also, which SC version?

Which editor environment?

What is the full error text, including stack?

hjh

1 Like

I’m doing a simple [1,2,3,4,5].plot;
which gives the total error message:

ERROR: Message ‘use’ not understood.
RECEIVER:
nil
ARGS:
Instance of Function { (0x126644098, gc=50, fmt=00, flg=00, set=02)
instance variables [2]
def : instance of FunctionDef in Method Plot:init
context : Frame (0x122404ef8) of Plot:init
}
PATH: /Volumes/DATABSE M/codes/supercollider/buffer_record/record_buffer.scd
CALL STACK:
DoesNotUnderstandError:reportError
arg this =
Nil:handleError
arg this = nil
arg error =
Thread:handleError
arg this =
arg error =
Object:throw
arg this =
Object:doesNotUnderstand
arg this = nil
arg selector = ‘use’
arg args = [*1]
Plot:init
arg this =
var fontName = nil
var gui = nil
var skin = nil
Plotter:makePlots
arg this =
var template = nil
Plotter:updatePlots
arg this =
Plotter:setValue
arg this =
arg arrays = [*5]
arg findSpecs = true
arg refresh = true
arg separately = true
arg minval = nil
arg maxval = nil
arg defaultRange = nil
ArrayedCollection:plot
arg this = [*5]
arg name = nil
arg bounds = nil
arg discrete = false
arg numChannels = nil
arg minval = nil
arg maxval = nil
arg separately = true
var array = [*5]
var plotter =
Interpreter:interpretPrintCmdLine
arg this =
var res = nil
var func =
var code = “[1,2,3,4,5].plot;”
var doc = nil
var ideClass =
Process:interpretPrintCmdLine
arg this =
^^ The preceding error dump is for ERROR: Message ‘use’ not understood.
RECEIVER: nil

version: 3.10.4
Supercollider IDE

ERROR: Message ‘use’ not understood.
RECEIVER:
nil
ARGS:
Instance of Function { (0x126644098, gc=50, fmt=00, flg=00, set=02)
instance variables [2]
def : instance of FunctionDef in Method Plot:init
context : Frame (0x122404ef8) of Plot:init
}
PATH: /Volumes/DATABSE M/codes/supercollider/buffer_record/record_buffer.scd
CALL STACK:
DoesNotUnderstandError:reportError
arg this =
Nil:handleError
arg this = nil
arg error =
Thread:handleError
arg this =
arg error =
Object:throw
arg this =
Object:doesNotUnderstand
arg this = nil
arg selector = ‘use’
arg args = [*1]
Plot:init
arg this =
var fontName = nil
var gui = nil
var skin = nil
Plotter:makePlots
arg this =
var template = nil
Plotter:updatePlots
arg this =
Plotter:setValue
arg this =
arg arrays = [*5]
arg findSpecs = true
arg refresh = true
arg separately = true
arg minval = nil
arg maxval = nil
arg defaultRange = nil
ArrayedCollection:plot
arg this = [*5]
arg name = nil
arg bounds = nil
arg discrete = false
arg numChannels = nil
arg minval = nil
arg maxval = nil
arg separately = true
var array = [*5]
var plotter =
Interpreter:interpretPrintCmdLine
arg this =
var res = nil
var func =
var code = “[1,2,3,4,5].plot;”
var doc = nil
var ideClass =
Process:interpretPrintCmdLine
arg this =
^^ The preceding error dump is for ERROR: Message ‘use’ not understood.
RECEIVER: nil

Thanks- I’ll check this sample on 3.11 and OS X.

Which operating system are you in?

The line that is breaking is skin.use { ... } at https://github.com/supercollider/supercollider/blob/b03eed4741055051fa9a4245998f90c3b449ffa4/SCClassLibrary/Common/GUI/PlusGUI/Math/PlotView.sc#L44

skin is supposed to be populated from GUI.skin.at(\plot) and this is supposed to be initialized in Plot’s *initClass. But skin is nil in the stack trace – so it seems that the initialization isn’t happening.

*initClass does a check for Platform.hasQt – if you’re using the IDE, this should be true.

Could you run Platform.hasQt and see what it says?

hjh

2 Likes

Cool! I’m on OS X 10.13.6

Hey sorry for the slow reply!

Platform.hasQt returned true.

Maybe I’ve corrupted a file somehow? Any ideas?

It happened to me too when something was failing at language boot time. In my case it was a broken installation of sc3-plugins and BBCut: StartUp was failing when trying to create a SynthDef from BBCut.
Could you post the complete log from when you start sclang?

EDIT: explaining a bit more: GUI.skin.at(\plot) is put there by a StartUp function; so if StartUp.run fails at any point before reaching that function, GUI.skin doesn’t get its \plot element.

1 Like

I didn’t realize it, but I had a long error message at startup, just like you described for yoruself. I opened up the startup.scd file and realized I had a faulty line of code in it. I removed it and now the .plot method is working!! Thanks!!

1 Like

I am ressurecting this thread b/c I was having a hard time getting .plot to work, and it was actually a faulty line in my startup.scd.

In my case, for some reason the implementation of MIDI in SuperDirt was broken, with “soundLibrary” not being recognized.

~dirt.soundLibrary.addMIDI(\midi, ~midiOut);

I commented this out and it started working properly.