Error in bsh while running Processing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Error in bsh while running Processing

backspaces
Processing.org's 2D/3D graphics system is truly wonderful.  It has  
the ability to run graphics in Java2D, JOGL, and a homegrown  
Processing3D library.
   http://processing.org/

The Processing community was interested in running it in an  
interactive mode so I tried some experiments with bsh.  Worked fine  
in 2D, but trying 3D, it failed for some reason.  Note I'm *not*  
using the JOGL/OpenGL version, but the Processing3D renderer which  
has no native methods and runs fine as an applet.

But when running a very simple bsh script to test the bsh+processing,  
I ran into an error, see crash listing at end of this email.

The script is pretty simple:
#!/usr/bin/env bsh
addClassPath("/Applications/Processing 0121/lib/core.jar");
import processing.core.*;

class Processing extends PApplet {
   public void setup() {
     //size(600, 500, JAVA2D); // works
     size(600, 500, P3D); // P3D .. doesn't work
   }
}
processing=new Processing();
processing.init();
frame = frame(processing);

I'm using the current processing library: core.jar, which is bundled  
with its IDE, see above Mac style classpath.  Is it possible bsh's  
reflection is looking for something not on the CLASSPATH?  I think  
Processing does use some reflection, but I've not run into difficulty  
with other JVM systems (Groovy, Jython).

Any ideas?  Possibly an environmental problem?

     -- Owen

Owen Densmore   http://backspaces.net


Error while running applet.
java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at bsh.Reflect.invokeMethod(Unknown Source)
         at bsh.BshMethod.invoke(Unknown Source)
         at bsh.BshMethod.invoke(Unknown Source)
         at bsh.Name.invokeLocalMethod(Unknown Source)
         at bsh.Name.invokeMethod(Unknown Source)
         at bsh.BSHMethodInvocation.eval(Unknown Source)
         at bsh.BSHPrimaryExpression.eval(Unknown Source)
         at bsh.BSHPrimaryExpression.eval(Unknown Source)
         at bsh.BSHBlock.evalBlock(Unknown Source)
         at bsh.BSHBlock.eval(Unknown Source)
         at bsh.BshMethod.invokeImpl(Unknown Source)
         at bsh.BshMethod.invoke(Unknown Source)
         at bsh.BshMethod.invoke(Unknown Source)
         at bsh.This.invokeMethod(Unknown Source)
         at Processing.setup(BeanShell Generated via ASM  
(www.objectweb.org))
         at processing.core.PApplet.handleDisplay(PApplet.java:1240)
         at processing.core.PGraphics.requestDisplay(PGraphics.java:564)
         at processing.core.PApplet.run(PApplet.java:1409)
         at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.RuntimeException: new renderer
         at processing.core.PApplet.size(PApplet.java:884)
         at processing.core.PApplet.size(PApplet.java:815)
         ... 23 more
java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at bsh.Reflect.invokeMethod(Unknown Source)
         at bsh.BshMethod.invoke(Unknown Source)
         at bsh.BshMethod.invoke(Unknown Source)
         at bsh.Name.invokeLocalMethod(Unknown Source)
         at bsh.Name.invokeMethod(Unknown Source)
         at bsh.BSHMethodInvocation.eval(Unknown Source)
         at bsh.BSHPrimaryExpression.eval(Unknown Source)
         at bsh.BSHPrimaryExpression.eval(Unknown Source)
         at bsh.BSHBlock.evalBlock(Unknown Source)
         at bsh.BSHBlock.eval(Unknown Source)
         at bsh.BshMethod.invokeImpl(Unknown Source)
         at bsh.BshMethod.invoke(Unknown Source)
         at bsh.BshMethod.invoke(Unknown Source)
         at bsh.This.invokeMethod(Unknown Source)
         at Processing.setup(BeanShell Generated via ASM  
(www.objectweb.org))
         at processing.core.PApplet.handleDisplay(PApplet.java:1240)
         at processing.core.PGraphics.requestDisplay(PGraphics.java:564)
         at processing.core.PApplet.run(PApplet.java:1409)
         at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.RuntimeException: new renderer
         at processing.core.PApplet.size(PApplet.java:884)
         at processing.core.PApplet.size(PApplet.java:815)
         ... 23 more


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users