JVM crash on linux at "glXMakeCurrent"

Hello,

I’ve got problems using jogl on linux. I actually do not manually use JOGL, instead i load vrml scenes using XJ3D toolkit. However, the exception is inside jogl, so i hope you will help me here.
So, when i try to load scene, JVM crashes (the log is below).
The curious thing is that when i first tried to load scene, everything worked fine, and not every (event simpliest) scene leads to a crash, except the first one! It still loads OK!
My videocard is GeForce7200, and i’ve got latest driver from nvidia installed. Linux’s glibc is 2.2.5 version, i use java1.6 (however, the same is under 1.4).

Any hint will be appreciated.
Thanks,
Andrey

Here’s the log (only part, because it’s too big for this forum and upload doesn’t work):

An unexpected error has been detected by Java Runtime Environment:

SIGSEGV (0xb) at pc=0x62d0bacc, pid=1938, tid=29720

Java VM: Java HotSpot™ Client VM (1.6.0_03-b05 mixed mode)

Problematic frame:

C [libGL.so+0x43acc]

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

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

--------------- T H R E A D ---------------

Current thread (0x0875d800): JavaThread “AV3D Runtime” [_thread_in_native, id=2021]

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000b48

Registers:
EAX=0x00000000, EBX=0x082d14b8, ECX=0x00000000, EDX=0xbcbfffff
ESP=0xbcbff3e0, EBP=0x09bd4028, ESI=0x00000000, EDI=0x64228000
EIP=0x62d0bacc, CR2=0x00000b48, EFLAGS=0x00010286

Top of Stack: (sp=0xbcbff3e0)
0xbcbff3e0: 08543f50 082d14b8 00800064 00800064
0xbcbff3f0: 00000000 00000004 08543f50 082d14b8
0xbcbff400: 09b9ffa0 64228000 09bd4028 00000001
0xbcbff410: 00000001 00000000 00000000 00000000
0xbcbff420: 09ba008c 62d57d40 08543f50 62d0d7ca
0xbcbff430: 08543f50 00800064 00800064 09ba008c
0xbcbff440: 008000fc bcbff478 5e752483 00bff484
0xbcbff450: 00000001 00000001 62d10a20 00000000

Instructions: (pc=0x62d0bacc)
0x62d0babc: 24 08 89 c6 8b 44 24 50 89 04 24 e8 64 11 ff ff
0x62d0bacc: 8b 96 48 0b 00 00 8b 4c 24 54 89 0a 8b 8e 48 0b

Stack: [0xbcbb0000,0xbcc00000), sp=0xbcbff3e0, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libGL.so+0x43acc]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.sun.opengl.impl.x11.GLX.glXMakeCurrent(JJJ)Z+0
j com.sun.opengl.impl.x11.X11GLContext.makeCurrentImpl()I+78
j com.sun.opengl.impl.x11.X11OnscreenGLContext.makeCurrentImpl()I+30
j com.sun.opengl.impl.GLContextImpl.makeCurrent()I+56
j org.j3d.aviatrix3d.output.graphics.BaseSurface.initCanvas()Z+13
j org.j3d.aviatrix3d.output.graphics.BaseSurface.draw(Lorg/j3d/aviatrix3d/rendering/ProfilingData;)Z+8
j org.j3d.aviatrix3d.output.graphics.BaseAWTSurface.draw(Lorg/j3d/aviatrix3d/rendering/ProfilingData;)Z+32
j org.j3d.aviatrix3d.pipeline.graphics.DefaultGraphicsPipeline.render()Z+72
j org.j3d.aviatrix3d.management.SingleDisplayCollection.process()Z+44
j org.j3d.aviatrix3d.management.SingleThreadRenderManager.run()V+477
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub

I suspect this is a bug in Aviatrix3D’s OpenGL context management. You should raise this issue with them.

Hi Ken, thanks for your reply.
Unfortunately, Aviatrix guys don’t answer.
Something started to work by now, and i can load one scene harmlessly. But when i try to load a second one in the same java application it crushes with the same error (even if i stop the first one rendering).
I’ve done some looking inside code. There seems to be invokes of makeCurrent() and release() before and after every frame is rendered. So maybe this is synchronization problem?
I also tried this on built-in Intel videocard and everything works, although very slow.
Any idea why this doesn’t with nVidia card? Why can makeCurrent crash?

App seems to be crushing when i “makeCurrent” the first context after the second one was created (but never rendered).