Nothing is drawn after AWT-Eventqueue thread is interrupted. Why?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Nothing is drawn after AWT-Eventqueue thread is interrupted. Why?

ozgurkurt
Hi all,

I've a annoying problem for sometime now, I cannot find any solutions. Any help is appreciated.

We have a pretty big and complex desktop application. We used to employ jogl 111a, I recently upgraded to latest jogamp 231.

We have a GLCanvas, working very well until some other AWT component calls Thread.currentThread.interrupt() (for whatever reason) during paint method execution. Afterwards GLCanvas doesn't get updated on the screen even though it's display(glad) method is executed completely.

What is wrong and how can I fix it?

Best regards,
Ozgur
Reply | Threaded
Open this post in threaded view
|

Re: Nothing is drawn after AWT-Eventqueue thread is interrupted. Why?

gouessej
Administrator
Hi

I advise you to reproduce your issue by modifying one of our tests so that we can reproduce it too and determine whether there is something to do. Why do you need to call Thread.currentThread().interrupt()? Do you reproduce this problem with NewtCanvasAWT?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Nothing is drawn after AWT-Eventqueue thread is interrupted. Why?

ozgurkurt
Hi, what about following file. This is a very simple test class.

What you need to do is, execute it and click lower half. About why we call interrupt(), well I don't know that but I cannot change it. Think about it like a 3rd party library that I've no access or no right to change.

InterruptTest.java
Reply | Threaded
Open this post in threaded view
|

Re: Nothing is drawn after AWT-Eventqueue thread is interrupted. Why?

gouessej
Administrator
Actually, your test still uses JOGL 1. It's the kind of test that I expect for a bug report, just port it to JOGL 2, remove all useless things (GLUT, ...), call GLU.createGLU(GL) to create the GLU instance, remove the few classes of the Java3D API and we can include your test in ours so that it will be used as a non regression test later. JOGL 1 is obsolete and has remained unmaintained for about 5 years...

Interrupting the AWT EDT is an extremely bad idea but maybe there is something in the AWT GLCanvas that detects an interruption and does something unwanted.

Edit.: You can follow these instructions to report a bug:
http://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing
I don't know if my post is clear. Your test is good, I just need something using JOGL 2 with no third party library and it will be usable.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Nothing is drawn after AWT-Eventqueue thread is interrupted. Why?

ozgurkurt
Julien,

Thanks for prompt replies. I've changed the source as you've asked. Please find it attached. Should I also file a bug report?

InterruptTest.java
Reply | Threaded
Open this post in threaded view
|

Re: Nothing is drawn after AWT-Eventqueue thread is interrupted. Why?

gouessej
Administrator
Thanks for the nice test, it's correct and usable now :) Yes please fill a bug report with your test as an attachment. Don't forget to provide the logs, it might be helpful.
Julien Gouesse | Personal blog | Website