Bug 1048 - Multiple windows not rendering on Java 7 on OSX with NewtCanvasAWT
Summary: Multiple windows not rendering on Java 7 on OSX with NewtCanvasAWT
Alias: None
Product: Jogl
Classification: JogAmp
Component: macosx (show other bugs)
Version: 2
Hardware: All macosx
: --- normal
Assignee: Sven Gothel
Depends on:
Reported: 2014-08-18 23:46 CEST by Matt Chudleigh
Modified: 2014-09-03 23:08 CEST (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---

Simple source for a test case, run Renderer.java (6.96 KB, application/x-zip-compressed)
2014-08-18 23:46 CEST, Matt Chudleigh

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Chudleigh 2014-08-18 23:46:11 CEST
Created attachment 622 [details]
Simple source for a test case, run Renderer.java

When using the NewtCanvasAWT bridge class on Mac OSX with Java 7 only the first opened window will have a valid OpenGL canvas. The second or more windows only show a default window fill.

This only seems to affect Mac OSX and works correctly with the Apple provided Java 6 JRE, but not Oracle Java 7 (we have not tried Java 8).

Attached is a fairly simple test case (a stripped down version of the Jaamsim renderer) that tries to open 3 red windows.
Comment 1 Sven Gothel 2014-09-02 04:55:41 CEST

Add unit tests demonstrating multiple NewtCanvasAWT instances are working
  Enhance following performance test cases, adding NewtCanvasAWT,
  beside GLCanvas and GLJPanel, 25 instances:
  Adding simple com.jogamp.opengl.test.junit.newt.TestMultipleNewtCanvasAWT
  w/ two instances.
  Manually tested on GNU/Linux and OSX (java7 and java8).

This bug report is invalid.


@Matt: I glanced over your ZIP file contents and did not try it, since:
  - too complex (not containing minimal use case)
  - not a unit test
Comment 2 Matt Chudleigh 2014-09-03 23:08:04 CEST
Okay, we found our problem.

You are right, it was not a JOGL bug, instead we were foolishly setting the AWT frame visible from a thread that wasn't the AWT event thread.

It does seem like a very unexpected failure case for that though.