Login  Register

Re: stuck in Processing with with any JOGL release >= RC6 (Mac)

Posted by Sven Gothel on Jul 14, 2012; 10:17am
URL: https://forum.jogamp.org/stuck-in-Processing-with-with-any-JOGL-release-RC6-Mac-tp4025519p4025530.html

On 07/14/2012 06:40 AM, ac [via jogamp] wrote:

> I isolated the commit that broke opengl rendering through AWT in Processing.
> It is the following:
>
> http://jogamp.org/git/?p=jogl.git;a=commit;h=3ed491213f8f7f05d7b9866b50d764370d8ff5f6
>
> The null pointer exception doesn't occur all the time, but roughly in 1 out of
> 5 runs. As I mentioned earlier, the error message that I get in the console is:
>
> java.lang.NullPointerException
>         at processing.mode.java.runner.Runner.findException(Runner.java:652)
>         at processing.mode.java.runner.Runner.reportException(Runner.java:597)
>         at processing.mode.java.runner.Runner.exception(Runner.java:537)
>         at
> processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
>         at
> processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
>         at processing.mode.java.runner.EventThread.run(EventThread.java:89)
> Exception in thread "Animation Thread" java.lang.NullPointerException
>         at javax.media.opengl.awt.GLCanvas.validateGLDrawable(GLCanvas.java:555)
>         at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:398)
>         at processing.opengl.PGL.requestDraw(Unknown Source)
>         at processing.opengl.PGraphicsOpenGL.requestDraw(Unknown Source)
>         at processing.core.PApplet.run(PApplet.java:1860)
>         at java.lang.Thread.run(Thread.java:680)
>
Thank you, hard work that was - KUDOS.
That proofs that the recursive lock was required, and the volatile barrier is
not satisfying here. Makes sense, will revert the locking part
and also add it for the remaining GLAutoDrawable (GLJPanel).

Must have missed the scenario, where GLCanvas's lifecycle isn't completely
being handled by AWT's EDT :)

> I don't know how to pass the JOGL debug flags to Processing right now, but I
> will find out soon and add the full log information.

When I was testing for mobile, I just added them to one of your property
files, guess there was a 'runtime' JVM property line ..

>
> As for NEWT, the test sketch run without any apparent problems, at least in 10
> consecutive runs using the same jogl jars I generated from the commit in question

Makes sense, it's properly sync'ed via the recursive lock.

~Sven


signature.asc (910 bytes) Download Attachment