Re: Swing Tool Tip Causes Incorrect GLContext
Posted by
Sven Gothel on
Mar 14, 2015; 12:55pm
URL: https://forum.jogamp.org/Swing-Tool-Tip-Causes-Incorrect-GLContext-tp4034154p4034155.html
On 03/13/2015 09:37 PM, flem [via jogamp] wrote:
> 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 <
http://forum.jogamp.org/file/n4034154/tooltipdemo.java> and
> the stack trace of the exception produced by JOGL tooltipstacktrace.txt
> <
http://forum.jogamp.org/file/n4034154/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.
This _was_ true for a long time, hmm.
However, I checked our test environment and jogl-demos,
and in most cases we test and 'demo' w/o any those 'sun.java2d' flags.
Maybe it is time to revisit the issue and squash the recommendation.
However, it would be nice to understand the issue a bit more.
Looking at your demo code, I assume that GLCanvas creation happens
on the AWT-EDT - well, your log file seems to support this.
Hmm, the mixing of Swing LW/HW often exposes issues of incompatibility.
> 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
> <
http://forum.jogamp.org/file/n4034154/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.
Maybe time to remove above mentioned recommendation?
We would need to gather a bit more cross platform data maybe.
Thank you for your thorough report.
It would be great if you can put all this to a new bug report
and we can track more heuristics there - and come to a conclusion.
~Sven