Hello everyone,
I need to be able to use some sliders and buttons in a sketch that run on a raspberry PI 3 (with raspbian) and thought about using G4P but I ran into a problem.
This is the test code I am using:
import g4p_controls.*;
GButton myBtn;
void setup() {
size(500, 500, P2D);
myBtn = new GButton(this, 10, 10, 100, 20, "TEST");
}
void draw() {
background(20);
}
void handleButtonEvents(GButton button, GEvent event) {
println("Button clicked");
}
When I try to run it, the following sentence appears in red in the console:
setMatrix is not vailable with this renderer
The program launch anyway and after a while the button appears but then I canāt do anything inside the window. Also, if I wait for long enough, another message appears that I canāt decrypt. I also donāt know where to find the revisions.txt
file stated at the end.
RunnableTask.run(): A caught exception occured on thread main-Display-.x11_:0.0-2-EDT-1: RunnableTask[enqueued true[executed false, flushed false], tTotal 0 ms, tExec 0 ms, tQueue 0 ms, attachment null, throwable java.lang.RuntimeException: java.lang.RuntimeException: Waited 5000ms for: <2dc15, 1eca7c5>[count 1, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.bcm.vc.iv_nil-1-EDT-1>]
java.lang.RuntimeException: java.lang.RuntimeException: Waited 5000ms for: <2dc15, 1eca7c5>[count 1, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.bcm.vc.iv_nil-1-EDT-1>
at jogamp.newt.DefaultEDTUtil.invokeImpl(DefaultEDTUtil.java:252)
at jogamp.newt.DefaultEDTUtil.invoke(DefaultEDTUtil.java:165)
at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:442)
at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2782)
at jogamp.newt.WindowImpl.setPosition(WindowImpl.java:2911)
at jogamp.newt.driver.x11.X11UnderlayTracker.windowMoved(X11UnderlayTracker.java:152)
at jogamp.newt.WindowImpl.consumeWindowEvent(WindowImpl.java:4386)
at jogamp.newt.WindowImpl.sendWindowEvent(WindowImpl.java:4317)
at jogamp.newt.WindowImpl.positionChanged(WindowImpl.java:4558)
at jogamp.newt.WindowImpl.sizePosMaxInsetsVisibleChanged(WindowImpl.java:4865)
at jogamp.newt.driver.x11.DisplayDriver.DispatchMessages0(Native Method)
at jogamp.newt.driver.x11.DisplayDriver.dispatchMessagesNative(DisplayDriver.java:112)
at jogamp.newt.WindowImpl.waitForVisible(WindowImpl.java:4449)
at jogamp.newt.WindowImpl.waitForVisible(WindowImpl.java:4443)
at jogamp.newt.WindowImpl.createNative(WindowImpl.java:777)
at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:1248)
at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1318)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:127)
at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:375)
Caused by: java.lang.RuntimeException: Waited 5000ms for: <2dc15, 1eca7c5>[count 1, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.bcm.vc.iv_nil-1-EDT-1>
at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
at jogamp.newt.WindowImpl$SetPositionAction.run(WindowImpl.java:2884)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:145)
... 1 more
DefaultEDT.run(): Caught exception occured on thread main-Display-.x11_:0.0-2-EDT-1: RunnableTask[enqueued false[executed true, flushed false], tTotal 10983 ms, tExec 10983 ms, tQueue 0 ms, attachment null, throwable java.lang.RuntimeException: java.lang.RuntimeException: Waited 5000ms for: <2dc15, 1eca7c5>[count 1, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.bcm.vc.iv_nil-1-EDT-1>]
java.lang.RuntimeException: java.lang.RuntimeException: Waited 5000ms for: <2dc15, 1eca7c5>[count 1, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.bcm.vc.iv_nil-1-EDT-1>
at jogamp.newt.DefaultEDTUtil.invokeImpl(DefaultEDTUtil.java:252)
at jogamp.newt.DefaultEDTUtil.invoke(DefaultEDTUtil.java:165)
at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:442)
at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2782)
at jogamp.newt.WindowImpl.setPosition(WindowImpl.java:2911)
at jogamp.newt.driver.x11.X11UnderlayTracker.windowMoved(X11UnderlayTracker.java:152)
at jogamp.newt.WindowImpl.consumeWindowEvent(WindowImpl.java:4386)
at jogamp.newt.WindowImpl.sendWindowEvent(WindowImpl.java:4317)
at jogamp.newt.WindowImpl.positionChanged(WindowImpl.java:4558)
at jogamp.newt.WindowImpl.sizePosMaxInsetsVisibleChanged(WindowImpl.java:4865)
at jogamp.newt.driver.x11.DisplayDriver.DispatchMessages0(Native Method)
at jogamp.newt.driver.x11.DisplayDriver.dispatchMessagesNative(DisplayDriver.java:112)
at jogamp.newt.WindowImpl.waitForVisible(WindowImpl.java:4449)
at jogamp.newt.WindowImpl.waitForVisible(WindowImpl.java:4443)
at jogamp.newt.WindowImpl.createNative(WindowImpl.java:777)
at jogamp.newt.WindowImpl.setVisibleActionImpl(WindowImpl.java:1248)
at jogamp.newt.WindowImpl$VisibleAction.run(WindowImpl.java:1318)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:127)
at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:375)
Caused by: java.lang.RuntimeException: Waited 5000ms for: <2dc15, 1eca7c5>[count 1, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.bcm.vc.iv_nil-1-EDT-1>
at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
at jogamp.newt.WindowImpl$SetPositionAction.run(WindowImpl.java:2884)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:145)
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help Ć¢ā ā Troubleshooting.
I did some more tests and here what I found out:
- Without the P2D renderer it works just fine with no surprise (on my computer-W10 and on my raspberry Pi).
- Now, weirdly enough, I also get this error on my computer and the sketch takes way more time to load but I can use the program correctly afterwards which make sense with what Iāve read on the internet saying that it is more of a warning than an actual error.
- The long error message does not appear on my computer either.
Can you please help me figure out a way to make it work or guide me to another library. I tried several other one but I really like how easy it is with this one to control the action on the events.
PS : I was using ControlP5 at first but it run really slow on my Pi, and not on my computerā¦