I am no expert in controlP5 but if we look at the draw method in file STL_support_without_ports.pde
we find
void draw() {
mainPage.show();
background(#C5DFF8);
fontHead = createFont("AdobeHeitiStd-Regular", 25);
textFont(fontHead);
textAlign(CENTER);
stroke(#A0BFE0);
fill(#A0BFE0);
stroke(#A0BFE0);
fill(#A0BFE0);
rect(55*10/10, 160*10/10, 390*10/10, 220*10/10);
stroke(#333333);
line(150*10/10, 183*10/10, 307*10/10, 183*10/10);
image(BEL_logo, 6*10/10, 4*10/10, 150*10/10, 65*10/10);
}
I assume that the statement mainPage.show();
causes the controlP5 controls to be drawn.
My concern is the third statement -
fontHead = createFont("AdobeHeitiStd-Regular", 25);
Now the draw()
method is executed ~60 times per second so creating the font 60 times per second is likely to cause problems. It would be usual to create the font in setup and use it in draw.
This might be the cause of the exception.