Bug 1048

Summary: Multiple windows not rendering on Java 7 on OSX with NewtCanvasAWT
Product: [JogAmp] Jogl Reporter: Matt Chudleigh <matt.chudleigh>
Component: macosxAssignee: Sven Gothel <sgothel>
Status: RESOLVED INVALID    
Severity: normal CC: harvey.harrison
Priority: ---    
Version: 2   
Hardware: All   
OS: macosx   
Type: --- SCM Refs:
9850c3a91a23983f1261cb38e4734524c67200f2
Workaround: ---
Attachments: Simple source for a test case, run Renderer.java

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
9850c3a91a23983f1261cb38e4734524c67200f2

Add unit tests demonstrating multiple NewtCanvasAWT instances are working
    
  Enhance following performance test cases, adding NewtCanvasAWT,
  beside GLCanvas and GLJPanel, 25 instances:
    com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit01AWT
    com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT
    
  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.