Processing 4 - Exception in thread "AWT-EventQueue-0"

Viewed 539

I'm trying to use processing-4.0b6-linux-x64 for Ubuntu 20.

It works well with Java and p5.js. Unfortunately it does not work at all with Python.

When I run the app from the terminal by ./processing, a sort of warning appears from the command line:

does not exist created registry at port 8220 could not create registry; assume it's already created

Anyway, the GUI works well, but running a very simple code:

def setup():
    size(800, 600)
    
def draw():
    pass

does not work and I receive the following list of errors:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: 'java.lang.String processing.app.Sketch.getMainProgram()'
    at jycessing.mode.run.PdeSketch.<init>(Unknown Source)
    at jycessing.mode.PyEditor.runSketch(Unknown Source)
    at jycessing.mode.PyEditor.handleRun(Unknown Source)
    at jycessing.mode.PyToolbar.handleRun(Unknown Source)
    at processing.app.ui.EditorToolbar$1.actionPerformed(EditorToolbar.java:135)
    at processing.app.ui.EditorButton.mousePressed(EditorButton.java:191)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6623)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
    at java.desktop/java.awt.Component.processEvent(Component.java:6391)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4572)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

I have java

openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

and javac

javac 11.0.13

already installed. Any suggestions?

2 Answers

It's just a regression in the beta 6 release: a method was removed that Python Mode was still using.

It was already reported here and fixed for beta 7 (when that's available), or if you build from source.

Processing 4.0b6 runs on Java 17.0.2, which is bundled with the app. You shouldn't use your own java runtime.

Assuming that this is still a beta, and devs experience similar issues, I would recommend you ensure that is run on bundled java.
Maybe try on another platform.
And finally, submit an issue to their GitHub

Related