Jogl / Java2D graphics pipline distorts canvas.

I’m trying to use the jogl / Java2D graphics pipeline via the -Dsun.java2d.opengl=True and -Djogl.debug.Java2D=True system properties. It used to work many moons ago (probably around January / February) but recently it distorts the GLCanvas as per attached image. Anybody know whether its currently active. I’m using latest NVIDIA drivers, mustang b84.

As you should see (if the attached image uploaded ok) the colors are all distorted as well as the shapes.

In theory things should be working pretty reliably. Do you see similar problems with the demos.jgears.JGears demo for example (i.e., running that with and without -Dsun.java2d.opengl=True)?

Yes the problem is the same. I’m not sure where to turn. My system info dumed is:

INIT GL IS: com.sun.opengl.impl.GLImpl
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 6200/AGP/SSE2
GL_VERSION: 2.0.2 NVIDIA 87.62
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 6200/AGP/SSE2
GL_VERSION: 2.0.2 NVIDIA 87.62

An interesting point is that the FPS with the pipeline in effect is about 3 times that without the pipeline in effect.

Thanks for the screenshots. I’ve heard of issues like this before, but we haven’t been able to reproduce them in house as of yet. I assume you’re running on some form of Linux?

Could you try the following and take one more screenshot?
-Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=true

Do you see this same problem if you run the usual JDK demos (SwingSet2, Java2Demo)?

Thanks,
Chris

Fedora Core 5 - 2.6.16-1.2133_FC5 kernel

The first screenshot is with :
java -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=True -cp jogl.jar:jogl-demos.jar demos.jgears.JGears
The console output is:

INIT GL IS: com.sun.opengl.impl.GLImpl
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 6200/AGP/SSE2
GL_VERSION: 2.0.2 NVIDIA 87.62
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 6200/AGP/SSE2
GL_VERSION: 2.0.2 NVIDIA 87.62

The second is with SwingSet2:
java -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=True -jar SwingSet2.jar

The thrid is with Java2Demo:
java -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=True -jar Java2Demo.jar

The sun.java2d.opengl.fbobject flag dosen’t alter anything.

Hi John,

Thanks for the update. This is enough info for me to file a bug report with Nvidia. However, could you try the -Dsun.java2d.opengl.fbobject=true flag again? Note that you need to specify “true” (all lowercase) for this property. The -Dsun.java2d.opengl property can be set to either “true” or “True”, the difference with “True” is that it prints a success/failure message to the console. (I know, this is kind of silly, but capitalization does matter here.)

Chris

Yesh, I noticed that there seemed to be a difference many moons ago, but I got used to using the capitalised one thinking that it would dump more info. However when I do this I get a crash.

java -Dsun.java2d.opengl=true -Dsun.java2d.opengl.fbobject=true -cp jogl.jar:jogl-demos.jar demos.jgears.JGears

and the response is:

INIT GL IS: com.sun.opengl.impl.GLImpl
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 6200/AGP/SSE2
GL_VERSION: 2.0.2 NVIDIA 87.62

An unexpected error has been detected by Java Runtime Environment:

SIGSEGV (0xb) at pc=0x04f0408e, pid=7445, tid=3040709536

Java VM: Java HotSpot™ Client VM (1.6.0-rc-b88 mixed mode, sharing)

Problematic frame:

C [libGL.so.1+0x3f08e]

An error report file with more information is saved as hs_err_pid7445.log

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

I’ve attached the error log

This only occurs when I specify the -Dsun.java2d.opengl.fbobject=true. If I leave this off then the result is the same as before.

java -Dsun.java2d.opengl=true -cp jogl.jar:jogl-demos.jar demos.jgears.JGears
java.lang.IllegalArgumentException: input == null!
at javax.imageio.ImageIO.read(ImageIO.java:1322)
at demos.jgears.JGears.(JGears.java:43)
at demos.jgears.JGears.main(JGears.java:110)
INIT GL IS: com.sun.opengl.impl.GLImpl
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 6200/AGP/SSE2
GL_VERSION: 2.0.2 NVIDIA 87.62
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 6200/AGP/SSE2
GL_VERSION: 2.0.2 NVIDIA 87.62

Cool, thanks for the info. For the record, I’ve filed a bug report with Nvidia (that refers back to this thread):
235482: Java/Swing/JOGL apps distorted (87.62, Linux)

The crash with the FBO codepath enabled is especially disappointing. Regardless, we plan to move forward and make the FBO codepath the default in an upcoming build, because there are many performance and reliability benefits, despite this short-term setback.

Thanks,
Chris

Thank you for effort, as I’ve been trying to get this issue dealt with for some months but I couldn’t find any definative response. I’ll keep my fingers crossed that they deal with it shortly.