fjenett / javascript-mode-processing

Former ProcessingJS mode (Processing 1.5) that became JavaScript mode (Processing 2.0 beta) that has now been moved out of the Processing IDE.
57 stars 13 forks source link

Nonsense java error when trying to run a sketch. Doesn't start the server and doesn't point to any error in sketch code #22

Closed teo1978 closed 9 years ago

teo1978 commented 9 years ago

I'm trying to run a sketch which works fine in Java mode.

At the first try I got this error in the IDE's console:

Exception in thread "Processing.BasicServer" java.lang.NoSuchMethodError: processing.app.Base.showWarning(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    at de.bezier.mode.javascript.JavaScriptBuild.build(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptBuild.export(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptMode.handleExport(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptEditor.handleExport(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptEditor.serverStarted(Unknown Source)
    at de.bezier.mode.javascript.BasicServer.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

The browser tab opened but kept waiting forever.

At the second try I got this error:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: processing.app.Base.showWarning(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    at de.bezier.mode.javascript.JavaScriptBuild.build(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptBuild.export(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptMode.handleExport(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptEditor.handleExport(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptEditor.handleStartServer(Unknown Source)
    at de.bezier.mode.javascript.JavaScriptToolbar.handlePressed(Unknown Source)
    at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:474)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

and the status bar says "server started; reload your browser window". Even after hitting the Stop button (and seeing the "server stopped" message), at any further try I get the same second error, and it does not even attempt to open the browser window, and it keep saying "server started; reload your browser window" despite the fact that the server should have been stopped.

As you can see there's no reference whatsoever to any error in the sketch code, so even if this is being triggered by some issue with my code, the behavior is wrong and buggy.

I may send you the sketch privately if you need it to debug the issue. I've tried an empty sketch and it "runs" as expected.

teo1978 commented 9 years ago

Some more details:

Perhaps the bug is related with having more than one file?

teo1978 commented 9 years ago

After restarting Processing the nonsense exception disappeared. However I see multiple files are not supported, and they definitely should be https://github.com/fjenett/javascript-mode-processing/issues/26

fjenett commented 9 years ago

Error gone. Closing.

teo1978 commented 9 years ago

Error gone until the next time it shows up, I guess. However this may be a Processing bug. It happens pretty often that the IDE starts giving random Java errors that disappear at restart...