Created attachment 692 [details]
Exception Stack Trace
I am seeing an issue where Swing tool tips are causing JOGL to be unable to obtain a valid GLContext. Before a tool tip is rendered, the proper GLContext is returned and everything works as expected. Any time after a Swing tool tip is rendered, new GLContext creations will fall back to OpenGL 1.1. This bug has been reproduced on multiple machines using ATI Radeon HD graphics cards, which are all I have available to test on.
I have included a very simple test case that reliably illustrates the problem tooltipdemo.java and the stack trace of the exception produced by JOGL tooltipstacktrace.txt.
Two things to note:
1) This bug does not appear if the "sun.java2d.d3d=false" (or older "sun.java2d.noddraw=true") value is not set, but everything I have read, including the JOGAMP webpage, says this flag is necessary to prevent other issues. If I am mistaken, please correct me.
2) I was not able to reproduce this on Java 1.7.0_07 with everything else the exact same, so there may have been a Java update that contributes to this.
ATI Radeon HD 5450 with older (2011) and latest graphics drivers
Java 1.7.0_67, Java 1.7.0_75, and 1.8.0_40 (but could not be reproduced on 1.7.0_07)
JOGL 2.1.5 (2.1-b1240-20140311) and 2.3.0 (2.3-b1378-20150311)
1) Execute the main method in the attached java file tooltipdemo.java.
2) Hover the mouse over the "Test" button until the tool tip appears.
3) Click on the "Test" button to attempt to open a GLCanvas.
Created attachment 693 [details]
Here is some information that may help with this issues. This issue is related to bug 1150 which was closed, I've been having this same crash for months see 1150 for logs. The latest release 2.3.1 did not fix my issues , I'm also running on AMD Radeon E6760 with latest AMD drivers.
This workaround of removing "sun.java2d.noddraw=true" has also fixed my issues.
*** Bug 1158 has been marked as a duplicate of this bug. ***
Bug 1146, Bug 1158: Add unit test for GLContext creation
after showing tool-tip within JDialog
Test passes on GNU/Linux X11 and Windows - both using NVidia driver.
Unit test is based on Robin Provost's code as attached in Bug 1158.
Bug 1146, Bug 1158: Add missing GLClearColor class
Fix TestBug1146GLContextDialogToolTipAWT / AWTRobotUtil.mouseClick(..)
use BUTTON1_MASK instead of BUTTON1_DOWN_MASK
Test passes on all platforms w/ current JOGL (git master branch),
i.e. incl. Windows + AMD Radeon driver (-> JOGL jenkins ..).
Please retest on your platform w/ TestBug1146GLContextDialogToolTipAWT,
using latest JOGL master branch.
If the bug persists, please reopen, otherwise confirm - thank you!