[BUG?] controlP5 chart loading problem
in
Contributed Library Questions
•
2 years ago
Hi,
This sketch taked from controlP5 examples produces Nullpointer exception when loading chart:
This sketch taked from controlP5 examples produces Nullpointer exception when loading chart:
- import controlP5.*;
ControlP5 controlP5;
Chart myChart;
void setup() {
size(600, 400);
controlP5 = new ControlP5(this);
myChart = controlP5.addChart("Hello", 20, 20, 400, 100);
}
void draw() {
background(0);
}
void keyPressed() {
if (key=='s') {
controlP5.save();
}
if (key=='l') {
controlP5.load("controlP5.xml");
}
}
- ControlP5 0.5.4 infos, comments, questions at http://www.sojamo.de/libraries/controlP5
28-sep-2011 16:19:18 controlP5.ControlP5IOHandler save
INFO: ControlP5 writing file data/controlP5.xml to disk.
loading (1)
28-sep-2011 16:19:21 controlP5.ControlP5 load
INFO: loading controlP5.xml
28-sep-2011 16:19:21 controlP5.ControlP5IOHandler parse
GRAVE: Unable to parse file. make sure the file exists. java.lang.NullPointerException
java.lang.NullPointerException
at controlP5.ControlP5IOHandler.parseController(Unknown Source)
at controlP5.ControlP5IOHandler.parse(Unknown Source)
at controlP5.ControlP5.load(Unknown Source)
at ControlP5chart_test.keyPressed(ControlP5chart_test.java:42)
at processing.core.PApplet.handleKeyEvent(PApplet.java:1996)
at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1979)
at processing.core.PApplet.handleDraw(PApplet.java:1643)
at processing.core.PApplet.run(PApplet.java:1530)
at java.lang.Thread.run(Thread.java:680)
1