controlP5 - ControlBroadcaster Unknown Source error

I create cp5 objects in buildGUI() method which is called in constructor of VisualController class:

private void buildGUI() {

             .setPosition(20, 20)
             .setRange(0, 10)
 // ... 

then in VisualController class I have methods that use the value from sliders :

public void maxVelocity(float theValue) {
        maxVelocity = theValue;

then in main PApplet I have :

void maxVelocity(float theValue) {


which calls VisualController respective method.

Code compiles and app is working but it reports below error:

controlP5.ControlBroadcaster printMethodError
SEVERE: An error occured while forwarding a Controller event, please check your code at maxVelocity
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at controlP5.ControlBroadcaster.invokeMethod(Unknown Source)
at controlP5.ControlBroadcaster.callTarget(Unknown Source)
at controlP5.ControlBroadcaster.broadcast(Unknown Source)
at controlP5.Controller.broadcast(Unknown Source)
at controlP5.Slider.setValue(Unknown Source)
at controlP5.Slider.setSliderMode(Unknown Source)
at controlP5.Slider.setWidth(Unknown Source)
at controlP5.Slider.setSize(Unknown Source)
at explorer.VisualController.buildGUI(

Why am i getting this error and how could i get rid of it? Many thanks for help.

Sign In or Register to comment.