Thread blocking issue with AWT (but not NEWT) on OSX

Posted by ac on
URL: https://forum.jogamp.org/Thread-blocking-issue-with-AWT-but-not-NEWT-on-OSX-tp4026674.html

I found (in Processing) that issuing any call to the frame object that contains the GL canvas, for example frame.setTitle(...), hangs the application. This happens under OSX (tested on 10.6.8), using AWT as the toolkit.

I wrote a minimal self-contained test code that roughly follows the rendering flow in Processing, and exhibits the problem:

http://pastebin.com/afEPhBh1

The frame.setTitle() call is right at the beginning of the draw() method. If I replace it with:

EventQueue.invokeLater(new Runnable() {
  public void run() {
    frame.setTitle("frame " + frameCount);
  }
});

then the code runs fine. I tested it using the jogl jars from an autobuild from two days ago. I should add this wasn't an issue until something changed in jogl recently, probably in the last week or so. It doesn't affect Windows, and haven't tested on Linux yet. An equivalent test code using NEWT:

http://pastebin.com/XxDnRh3a

doesn't show the problem on OSX.