Bug 1146 - Swing Tool Tip Causes Incorrect GLContext
: Swing Tool Tip Causes Incorrect GLContext
Status: RESOLVED WORKSFORME
: None
: Jogl
: JogAmp
: awt (show other bugs)
: 2.3.2
: pc_x86_64 windows
: --- normal
: Sven Gothel
:
: 1158 (view as bug list)
:
:
 
Reported: 2015-03-16 14:24 CET by forumacct4spam
Modified: 2015-09-27 01:31 CEST (History)
3 users (show)

:
Type: ---
SCM Refs:
f60a737b18d6763ac1f443fce0b61c844666e2a8 53cc42950597d3604eca9fcacad643f5fb868929 c47dab67985a23040effea36d69356737e40d4e5
Workaround: ---


Attachments
Exception Stack Trace (2.48 KB, text/plain)
2015-03-16 14:24 CET, forumacct4spam
Details
Test Case (1008 bytes, text/x-java-source)
2015-03-16 14:24 CET, forumacct4spam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description forumacct4spam 2015-03-16 14:24:06 CET
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.

Tested Configurations:
        Windows 7
        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)

To replicate:
        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.
Comment 1 forumacct4spam 2015-03-16 14:24:55 CET
Created attachment 693 [details]
Test Case
Comment 2 Steve 2015-04-18 09:01:12 CEST
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.
Comment 3 Robin Provost 2015-05-25 19:01:54 CEST
*** Bug 1158 has been marked as a duplicate of this bug. ***
Comment 4 Sven Gothel 2015-07-24 23:05:01 CEST
commit f60a737b18d6763ac1f443fce0b61c844666e2a8
    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.

commit 53cc42950597d3604eca9fcacad643f5fb868929
    Bug 1146, Bug 1158: Add missing GLClearColor class

commit c47dab67985a23040effea36d69356737e40d4e5
    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!