jashkenas / ruby-processing

Code as Art, Art as Code. Processing and Ruby are meant for each other.
http://github.com/jashkenas/ruby-processing/wikis
Other
1.28k stars 94 forks source link

Camera examples fail on MacOS X 10.5 #5

Closed ryszard closed 15 years ago

ryszard commented 15 years ago
(richard garibaldi):~/Projects/ruby-processing/samples% rp5 run processing_app/3D/camera/perspective.rb 
Exception in thread "Animation Thread" processing/core/PApplet.java:1013:in `size': processing.core.PApplet$RendererChangeException: null (NativeException)
from processing/core/PApplet.java:959:in `size'
from sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0'
from sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke'
from sun/reflect/DelegatingMethodAccessorImpl.java:25:in `invoke'
from java/lang/reflect/Method.java:585:in `invoke'
from org/jruby/javasupport/JavaMethod.java:298:in `invokeWithExceptionHandling'
from org/jruby/javasupport/JavaMethod.java:259:in `invoke'
from org/jruby/java/invokers/InstanceMethodInvoker.java:67:in `call'
 ... 13 levels...
from processing/core/PApplet.java:1328:in `run'
from java/lang/Thread.java:613:in `run'
from :1
Complete Java stackTrace
processing.core.PApplet$RendererChangeException
at processing.core.PApplet.size(PApplet.java:1013)
at processing.core.PApplet.size(PApplet.java:959)
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 org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:298)
at org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:259)
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:67)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:192)
at org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:101)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:113)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:117)
at org.jruby.RubyClass.finvoke(RubyClass.java:449)
at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:401)
at org.jruby.javasupport.proxy.JavaProxyConstructor$2.invoke(JavaProxyConstructor.java:230)
at org.jruby.proxy.processing.core.PApplet$Proxy0.setup(Unknown Source)
at processing.core.PApplet.handleDraw(PApplet.java:1400)
at processing.core.PApplet.run(PApplet.java:1328)
at java.lang.Thread.run(Thread.java:613)
...internal jruby stack elided...
from processing.core.PApplet.size(PApplet.java:959)
from sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
from sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
from sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
from java.lang.reflect.Method.invoke(Method.java:585)
from org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:298)
from org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:259)
from org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:67)
from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313)
from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:192)
from org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:101)
from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:113)
from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:117)
from org.jruby.RubyClass.finvoke(RubyClass.java:449)
from org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:401)
from org.jruby.javasupport.proxy.JavaProxyConstructor$2.invoke(JavaProxyConstructor.java:230)
from org.jruby.proxy.processing.core.PApplet$Proxy0.setup(Unknown Source)
from processing.core.PApplet.handleDraw(PApplet.java:1400)
from processing.core.PApplet.run(PApplet.java:1328)
from java.lang.Thread.run(Thread.java:613)
ryszard commented 15 years ago

I am using rp5 version 1.0.8, installed using gem.

jurisgalang commented 15 years ago

Might be a different issue, but I think I've seen this before - I had my default Java set to Java 6.

jashkenas commented 15 years ago

What Java version are you using? It's working just fine for me on 10.5 with Java (build 1.5.0_16-b06-284)

jashkenas commented 15 years ago

It's also working for me on 10.5 with Java 6 (build 1.6.0_07-b06-153). Are there any more details about your setup you can provide?

ryszard commented 15 years ago

I have the exact same versions of java as you. I tried to run the example with both, and with both I get the same error :( Is there any more information about my setup that may help you reproduce the bug? I don't know Java and I am very new to Ruby, so I hardly have a clue about what could be useful.

jashkenas commented 15 years ago

So, you're getting a RendererChangeException, which is something that Ruby-Processing's patched version of Processing' core.jar should be catching, and handling. Did you replace core.jar? If not, try running this instead, which uses a slightly different flavor of sketch creation:

http://gist.github.com/110792

ryszard commented 15 years ago

I haven't replaced core.jar. Running the new script you provided I still get the exact same error. I also tried to reinstalling the gem, which also didn't help.

jashkenas commented 15 years ago

Then two questions ... does ruby-processing fail on any other sketches aside from the camera ones? And what architecture does your machine have (64-bit, 32)?