Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controlp5 2.2.5 not working with Processing 3.0.1 FX2D renderer #36

rozling opened this issue Dec 16, 2015 · 2 comments


Copy link

@rozling rozling commented Dec 16, 2015

Windows 7, Processing 3.0.1

Taking a number of examples (e.g. button / slide / textfield), adding FX2D to the size() constructor consistently results in the following error which prevents the sketch from running:

ControlP5 2.2.5 infos, comments, questions at
    at processing.javafx.PGraphicsFX2D$FontCache$Key.hashCode(
    at java.util.HashMap.hash(
    at java.util.LinkedHashMap.get(
    at processing.javafx.PGraphicsFX2D$FontCache.get(
    at processing.javafx.PGraphicsFX2D.handleTextFont(
    at processing.javafx.PGraphicsFX2D.textFontImpl(
    at processing.core.PGraphics.textFont(
    at controlP5.ControlFont.adjust(Unknown Source)
    at controlP5.Label$SinglelineLabel.draw(Unknown Source)
    at controlP5.Label$SinglelineLabel.draw(Unknown Source)
    at controlP5.Label.draw(Unknown Source)
    at controlP5.Textfield.draw(Unknown Source)
    at controlP5.ControllerGroup.drawControllers(Unknown Source)
    at controlP5.ControllerGroup.draw(Unknown Source)
    at controlP5.ControlWindow.draw(Unknown Source)
    at controlP5.ControlWindow.draw(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at processing.core.PApplet$RegisteredMethods.handle(
    at processing.core.PApplet$RegisteredMethods.handle(
    at processing.core.PApplet.handleMethods(
    at processing.core.PApplet.handleDraw(
    at processing.javafx.PSurfaceFX$1.handle(
    at processing.javafx.PSurfaceFX$1.handle(
    at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(
    at com.sun.scenario.animation.shared.TimelineClipCore.playTo(
    at javafx.animation.Timeline.impl_playTo(
    at javafx.animation.AnimationAccessorImpl.playTo(
    at com.sun.scenario.animation.shared.InfiniteClipEnvelope.timePulse(
    at javafx.animation.Animation.impl_timePulse(
    at javafx.animation.Animation$1.lambda$timePulse$26(
    at javafx.animation.Animation$1$$Lambda$102/ Source)
    at Method)
    at javafx.animation.Animation$1.timePulse(
    at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(
    at com.sun.scenario.animation.AbstractMasterTimer$
    at$$Lambda$56/ Source)
    at Method)
    at$$Lambda$52/ Source)
handleDraw() called before finishing
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.

This comment has been minimized.

Copy link

@sojamo sojamo commented Jan 5, 2016

In the case of using the FX2D renderer, controlP5's BitFont can't be rendered and by attempting to do so the above error message is caused. To work around this, set the font to a non-BitFont by calling cp5.setFont(createFont("Arial",10)); right after creating an instance of cp5.


This comment has been minimized.

Copy link

@rozling rozling commented Jan 11, 2016

This worked for me (sorry for delay in confirming); thanks for the workaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.