
controlp5 - issue #64
Setting ControlFont on initialize controlP5 cause a null pointer exception
What steps will reproduce the problem? 1. Write following code import controlP5.*;
ControlP5 cp5;
void setup() { size(100,100); cp5 = new ControlP5(this, new ControlFont(createFont("Ubuntu", 12))); }
void draw() { }
Run the code
Following error is shown Exception in thread "Animation Thread" java.lang.NullPointerException at controlP5.ControlP5.updateFont(Unknown Source) at controlP5.ControlP5.setFont(Unknown Source) at controlP5.ControlP5.<init>(Unknown Source) at sketch_121015b.setup(sketch_121015b.java:29) at processing.core.PApplet.handleDraw(PApplet.java:2103) at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190) at processing.core.PApplet.run(PApplet.java:2006) at java.lang.Thread.run(Thread.java:722)
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system? - Processing 2.0 Beta 3 - ControlP5 2.0.1 - Ubuntu 12.4
Please provide any additional information below.
Comment #1
Posted on Oct 15, 2012 by Grumpy LionI temporary use following workaround: Calling setFont() after initialize ControlP5 without setting the ControlFont
cp5 = new ControlP5(this); cp5.setFont(aControlFont);
Comment #2
Posted on Oct 17, 2012 by Happy Rhino(No comment was entered for this change.)
Comment #3
Posted on Dec 23, 2012 by Happy Rhino(No comment was entered for this change.)
Status: Fixed
Labels:
Type-Defect
Priority-Medium