From f90a7e72e957fa345575a9a5378c7f9edcbfb7ae Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 30 Aug 2011 19:39:32 +0200 Subject: 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). --- .../text/TestAWTTextRendererUseVertexArrayBug464.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/test/com/jogamp/opengl') 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; } -- cgit v1.2.3