jogl crashes video card driver

classic Classic list List threaded Threaded
126 messages Options
1 ... 34567
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

Sven Gothel
Administrator
On 01/15/2013 07:50 PM, gouessej [via jogamp] wrote:

>     runiter wrote
>     one more thing, looks like com.ardor3d.example.canvas.JoglAwtExample
>     doesn't work standalone either. Here is the exception:
>
>     java.lang.reflect.InvocationTargetException
>             at java.awt.EventQueue.invokeAndWait(Unknown Source)
>             at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
>             at
>     com.ardor3d.framework.jogl.JoglAwtCanvas.init(JoglAwtCanvas.java:64)
>             at
>     com.ardor3d.framework.jogl.JoglAwtCanvas.draw(JoglAwtCanvas.java:79)
>             at
>     com.ardor3d.framework.FrameHandler.updateFrame(FrameHandler.java:90)
>             at
>     com.ardor3d.example.canvas.JoglAwtExample.main(JoglAwtExample.java:132)
>     Caused by: java.lang.IllegalArgumentException: contextKey not found in
>     context store.
>
> That's fixed, I've just done a pull request to fix this regression, sorry.
Nice.

While looking at the stack trace - I still saw the catched context not current
@ GLDrawableHelper.invokeGLImpl(..).

Again - The method in question only performs a ctx.release() iff a previous
ctx.makeCurrent() was successful. Both calls happen in the same block.
So my only conclusion here is, that a release has happened within that block,
i.e. within the passed Runnable.
Is that fixed as well ?

The log file also shows 'http://forum.jogamp.org/file/n4027841/log3.txt',
that lot's of AWT calls (pack, size, ..) were issued from the main thread
(from the main method of said example). Hope that won't cause problems.

Looks like a special demo .. hmm, shall we migrate it to one of our unit tests?

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
Sven Gothel wrote
While looking at the stack trace - I still saw the catched context not current
@ GLDrawableHelper.invokeGLImpl(..).

Again - The method in question only performs a ctx.release() iff a previous
ctx.makeCurrent() was successful. Both calls happen in the same block.
So my only conclusion here is, that a release has happened within that block,
i.e. within the passed Runnable.
Is that fixed as well ?
Yes GLContext.release() is called in the Runnable after the call to GLCanvas.display() only if the canvas hasn't already been released (see if (_context.equals(GLContext.getCurrent()))). But the exception is thrown in GLCanvas.display() (see javax.media.opengl.awt.GLCanvas$7.run()). How does it behave when there is no GLEventListener?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
In reply to this post by Sven Gothel
@Sven The context might be already released here.

@Runiter please test with ardor-jogl (from my repository). I need to know what happens on your machine.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

runiter
gouessej wrote
@Runiter please test with ardor-jogl (from my repository). I need to know what happens on your machine.
gouessej, the git version of your ardor-jogl seems outdated and I don't have svn in this machine.
can you send me the patch?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

Sven Gothel
Administrator
In reply to this post by gouessej
On 01/15/2013 09:35 PM, gouessej [via jogamp] wrote:
> @Sven The context might be already released here
> <https://github.com/sgothel/jogl/blob/master/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java#L993>.
>

nope, that is a current context by the current thread, but a different one
(recursion case).

this case is covered, i.e.:
  other.release();
  if( this.makeCurrent() ) {
    runnable.run();
  } finally {
  this release();
  }
  other.makeCurrent();

I guess I will fetch sources for this test case and double check.

~Sven


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
In reply to this post by runiter
runiter wrote
gouessej wrote
@Runiter please test with ardor-jogl (from my repository). I need to know what happens on your machine.
gouessej, the git version of your ardor-jogl seems outdated and I don't have svn in this machine.
can you send me the patch?
It's not outdated, I synchronized it with Renanse's version a few days ago, it's up-to-date and anyway Renanse accepted my latest pull request yesterday.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
In reply to this post by Sven Gothel
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

runiter
In reply to this post by gouessej
gouessej wrote
@Runiter please test with ardor-jogl (from my repository). I need to know what happens on your machine.
JoglAwtExample works now. But you still that release context exception at each frame render.
Here is the full log for running JoglAwtExample for few seconds:
log4.txt
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
runiter wrote
gouessej wrote
@Runiter please test with ardor-jogl (from my repository). I need to know what happens on your machine.
JoglAwtExample works now. But you still that release context exception at each frame render.
Here is the full log for running JoglAwtExample for few seconds:
log4.txt
Thanks. You see that the unnecessary release call comes from within JOGL, in the display action:
at jogamp.opengl.GLContextImpl.release(GLContextImpl.java:279)
        at jogamp.opengl.GLContextImpl.release(GLContextImpl.java:272)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1027)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:889)
        at javax.media.opengl.awt.GLCanvas$7.run(GLCanvas.java:1038)

We're going to fix this bug very soon.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

runiter
gouessej wrote
We're going to fix this bug very soon.
yay, thank you. guess I should've started with this ardor3d example in the first place. will remember that for future bugs.

cheers
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
I will try to reproduce this bug without Ardor3D, maybe with a small test case with no GLEventListener.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
In reply to this post by runiter
@Runiter the bug is reproducible under GNU Linux. Please use the RC11 instead of the latest autobuild until we fix the bug in JOGL itself.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

runiter
gouessej wrote
@Runiter the bug is reproducible under GNU Linux. Please use the RC11 instead of the latest autobuild until we fix the bug in JOGL itself.
I'm going to stick with the latest build because as you know RC11 doesn't even render in webstart. Hopefully you'll find a fix when you get the chance.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
Sven is looking at it too. I still use the RC11 with TUER and it renders in web start but with NEWT. Do you plan to use JoglNewtAwtCanvas?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

runiter
What are the advantages and disadvantages of JoglNewtAwtCanvas vs. JoglAwtCanvas?
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
It's more reliable, it is compatible with AWT but it uses only an AWT peer, it's less heavy. For example, it is not concerned by the bug with Intel 3000 HD. The only drawback is that the mapping between AWT and NEWT events might need some more work.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
In reply to this post by runiter
There is a temporary workaround on my repository and the libraries have been updated too. When I have a better fix, I will make a pull request.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

Sven Gothel
Administrator
On 01/18/2013 12:26 AM, gouessej [via jogamp] wrote:
> There is a temporary workaround on my repository and the libraries have been
> updated too. When I have a better fix, I will make a pull request.

Culprit found, JOGL's GLContext makeCurrent()
  <https://jogamp.org/bugzilla/show_bug.cgi?id=669>

Will produce unit test and fix .. 1-2 hours.

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

Sven Gothel
Administrator
In reply to this post by gouessej
On 01/18/2013 01:38 AM, Sven Gothel wrote:
> On 01/18/2013 12:26 AM, gouessej [via jogamp] wrote:
>> There is a temporary workaround on my repository and the libraries have been
>> updated too. When I have a better fix, I will make a pull request.
>
> Culprit found, JOGL's GLContext makeCurrent()
>   <https://jogamp.org/bugzilla/show_bug.cgi?id=669>
>
> Will produce unit test and fix .. 1-2 hours.
>

<http://jogamp.org/git/?p=jogl.git;a=commit;h=34687193484b2404d83eebf5d008b71d54e52286>
<https://jogamp.org/bugzilla/show_bug.cgi?id=669>

Fixed.

Sorry for the inconvenience - and actually great that you triggered this bug!
We had no unit test case for recursive makeCurrent/release - so this is good now.

Note: makeCurrent/release is not required from within any method in a GLEventListener,
      however it shall not harm either!

~Sven


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogl crashes video card driver

gouessej
Administrator
Thanks! Great job Sven :) as usual.

I don't use GLEventListener, GLCanvas.display() is called only once at initialization time in my case, I mostly use invokeGL().

Edit.: Please can you make an autobuild with this fix?
Julien Gouesse | Personal blog | Website
1 ... 34567