p5.js mode NullPointerException errors

edited October 2016 in p5.js

Hi, I was excited to see there's a p5.js mode in Processing 3.2.1, but I can't seem to get any use out of it except as a text editor. I can run the example program 'Embedded Iteration' okay, but p5.js programs I've made before always give me a puzzling NullPointerException, although they still work if I just open the index.html file in the browser. Here's the output I'm getting, none of which seems to give any hint what I might be doing wrong:

java.lang.NullPointerException at processing.mode.p5js.p5jsBuild.updateHtml(p5jsBuild.java:85) at processing.mode.p5js.p5jsEditor.handleRun(p5jsEditor.java:275) at processing.mode.p5js.p5jsToolbar.handleRun(p5jsToolbar.java:32) at processing.app.ui.EditorToolbar$1.actionPerformed(EditorToolbar.java:158) at processing.app.ui.EditorButton.mousePressed(EditorButton.java:181) at java.awt.Component.processMouseEvent(Component.java:6530) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4522) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Answers

  • ...just me then? :(

  • I haven't much idea about this, but as far as I know, all this "p5.js Mode" is is an editor for writing p5.js code.

  • p5.js programs I've made before

    If the examples work, but your own code doesn't, then the language may have changed...?

    If you provide a small example sketch that breaks, other p5.js users might be able to help you debug. If they can't, perhaps you should report it as an error on GitHub and give your small example sketch so that the p5.js devs can reproduce the problem.

    If you don't provide a sketch there isn't much anyone can do. As you said, a NullPointerException isn't much of a hint.

Sign In or Register to comment.