I've been using JOGL 1.1.1a on Ubuntu for some time and setting sun.java2d.opengl=True to improve performance for applications using GLJPanel. Everything has been working smoothly until I updated to Ubuntu 10.10 which includes the new Nvidia driver version 260.19.06 (Ubuntu 10.04 used 195.36.15, which worked great).
With Ubuntu 10.10 and the Nvidia 260.19.06 and sun.java2d.opengl=True I see the following problems: 1. Nothing is visibly drawn in GLJPanels. 2. If I turn on jogl.debug I get this warning: X11ExternalGLDrawable: WARNING: forcing GLX_RGBA_TYPE for newly created contexts. 3. X often crashes with a segmentation fault when the java application exits: Backtrace: [ 770.382] 0: /usr/bin/X (xorg_backtrace+0x28) [0x4a0fa8] [ 770.382] 1: /usr/bin/X (0x400000+0x60fcd) [0x460fcd] [ 770.382] 2: /lib/libpthread.so.0 (0x7f7d47901000+0xfb40) [0x7f7d47910b40] [ 770.382] 3: /usr/lib/xorg/extra-modules/nvidia_drv.so (0x7f7d42279000+0x3a3a7c) [0x7f7d4261ca7c] [ 770.382] 4: /usr/bin/X (FreeClientResources+0xef) [0x44bc5f] [ 770.382] 5: /usr/bin/X (CloseDownClient+0x5c) [0x427c0c] [ 770.382] 6: /usr/bin/X (0x400000+0x2c3a6) [0x42c3a6] [ 770.382] 7: /usr/bin/X (0x400000+0x2184b) [0x42184b] [ 770.382] 8: /lib/libc.so.6 (__libc_start_main+0xfe) [0x7f7d4686cd8e] [ 770.382] 9: /usr/bin/X (0x400000+0x213d9) [0x4213d9] [ 770.382] Segmentation fault at address (nil) With Nvidia 260.19.06 and sun.java2d.opengl=false, I see things being drawn correctly in GLJPanels. However I still often see the X segmentation fault when the java application exits (#3 above). Ubuntu 10.10 also gives me the option to install version 173.14.28 of the Nvidia drivers. Using this version, things work perfectly with sun.java2d.opengl=True or sun.java2d.opengl=false. I do not see any warning from X11ExternalGLDrawable. So it appears I have a workaround for the moment in using older Nvidia 173.14.28 drivers, but I am a bit nervous that things are broken with the newer drivers. Has anyone else seen problems with Nvidia 260.xx drivers? |
Administrator
|
It seems to be a driver bug. I use Mandriva Linux 2010 with an ATI Radeon 1950 Pro. I had no such problems with NVIDIA graphics cards. However, GLJPanel is not fully supported on Mac and quite broken in JOGL 2.0 beta, I don't advise you to use it except if it is mandatory.
Julien Gouesse | Personal blog | Website
|
Today I tried the latest 260.19.12 drivers and verified I have the same problems.
I also discovered that if I set -Dsun.java2d.opengl.fbobject=false with -Dsun.java2d.opengl=true, I can see things displayed correctly in GLJPanel. I have not found any fix for X crashing when the java application exits though. Several years ago it was necessary to set sun.java2d.opengl.fbobject=false to work around NVIDIA driver problems, maybe these problems are back? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6439320 I started a thread on forums.nvidia.com about this here: http://forums.nvidia.com/index.php?showtopic=183290 Does anyone have other suggestions of how to get help from NVIDIA? |
Administrator
|
-Dsun.java2d.opengl.fbobject=false ok... then JOGL uses PBuffers instead.
Maybe reopen the bug, it might be a regression.
Julien Gouesse | Personal blog | Website
|
After more experiments I think there is a general problem with the Java2D OpenGL pipeline and the NVIDIA 260.xx drivers. Even normal Swing applications that don't use JOGL do not display correctly with the NVIDIA 260.xx drivers and -Dsun.java2d.opengl=true.
The workaround of setting -Dsun.java2d.opengl.fbobject=false fixes the display for 2D applications and JOGL applications, but it does not prevent the X server from crashing when the Java app shuts down. I posted a thread about it here on the NVIDIA linux forum: http://www.nvnews.net/vbulletin/showthread.php?p=2334240 Hopefully someone from NVIDIA will take a look. I wounder if it would be good to open a bug on bugs.sun.com too? |
In reply to this post by ariekenb
Noticed the same problem with nVidia 260.89 drivers on Windows.
Found a workaround that does not crash the app. Just need to turn Threaded optimization in nVidia panel to on or off. Do not set it to auto. Strangely the auto setting is causing the crash. Hoping for a fix from nVidia soon. Cheers. |
mrvoid - Thanks for the suggestion. Unfortunately there is no "threaded optimization" setting that I can find in the Linux version of nvidia-settings.
Someone from NVIDIA replied to my post on the nvnews.net forum and asked for a test case - I'm hopeful this will make progress. :) |
Administrator
|
I was also unable to find such a setting (on CentOS 5.4 with the same nvidia drivers).
Please let us know if you hear from nvidia -- I might be seeing some similar symptoms in an exploratory test I'm doing. |
Administrator
|
Turns out that my similar problem (SIGSEGV in libpthread on startup of JOGL app) were caused by me not calling GLProfile.initSingleton() soon enough in my app.
This is probably not exactly the same as your problem, since it sounds like you're using JOGL 1.1.1a, not JOGL 2.0 beta. But there might be some similar workarounds -- perhaps calling XInitThreads() manually in your app would fix it. |
I've been running a small app to help myself learn JOGL with a GLJPanel on Windows XP without any trouble. I just tried to run it on a new laptop with Windows 7 64 (with an nvidia card, 270 drivers) and the app freezes up.
If I run without my GLJPanel everything is fine. I tried the define above but it didn't work for me. I'm posting my init calls to jogl below to see if anyone can point out anything glaring. I'm using jogl 2 signed candidate (dated March 3, 2011). Thanks in advance for any help. I'm a bit stuck (I've tried the Dell drivers as well). Hopefully it's the way I'm using JOGL. From a "main" class: GLProfile glprofile = GLProfile.getDefault(); GLCapabilities glcapabilities = new GLCapabilities( glprofile ); myPanel = new MyGLJPanel(glcapabilities,size); The init() method for MyGLJPanel is: public void init(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); gl.glEnable(GL.GL_DEPTH_TEST); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); gl.glFlush(); } I invoke draw() as I need to (not using an FPSAnimator). At the moment, draw is just rotating a cylinder. public void display(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glLoadIdentity(); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); gl.glPushMatrix(); gl.glTranslatef(0.0f, 0.0f, 0.0f); setGreen(gl); float fRadius = 10.0f; float fHeight = 30.0f; int fSlices = 40; int fStacks = 1; // some rotation code here // draw the cylinder fGlut.glutWireCylinder(fRadius, fHeight, fSlices, fStacks); gl.glPopMatrix(); gl.glFlush(); } |
Administrator
|
Could you post your whole app here? I can try to run it on another Win 7 64-bit nvidia machine and see if I get the same behavior.
|
I'll post tomorrow. Thanks Wade.
|
Wade, this ended up not being related to JOGL. I'm happy to report that the GLJPanel within JInternalFrame is working as I expect.
|
Administrator
|
Excellent! That's my favorite kind of problem
|
Free forum by Nabble | Edit this page |