diff options
author | Sven Gothel <[email protected]> | 2011-08-30 19:39:32 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-30 19:39:32 +0200 |
commit | f90a7e72e957fa345575a9a5378c7f9edcbfb7ae (patch) | |
tree | bb2842925c17c8ea02730004fc640bffb1119d73 | |
parent | 7df34910488d930123cb5fd09f3075f6599bc98e (diff) |
TestAWTTextRendererUseVertexArrayBug464: Run AWT destruction on AWT-EDT
This fixes the _XSend X11 error on GLX commands using AMD driver .. proper cause unknown,
but probably a race or condition or threading issue (Display usage by diff threads).
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java index 5475d3446..bde9f42ed 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java @@ -37,8 +37,10 @@ import com.jogamp.opengl.test.junit.util.UITestCase; import java.awt.Frame; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import org.junit.Assert; +import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; import org.junit.After; @@ -90,11 +92,18 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase { @After public void cleanupTest() { - frame.setVisible(false); - frame.remove(glCanvas); + try { + javax.swing.SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + frame.setVisible(false); + frame.remove(glCanvas); + frame.dispose(); + }}); + } catch( Throwable throwable ) { + throwable.printStackTrace(); + Assume.assumeNoException( throwable ); + } glCanvas=null; - Assert.assertNotNull(frame); - frame.dispose(); frame=null; } |