Not reproductible GL4bcImpl error with shaders program

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Not reproductible GL4bcImpl error with shaders program

tartox
Hello
I am using ShaderCode to create and link programs and shaders. Everything works fine most of the time.
However, from time to time, the application crashes with these kind of errors:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 4022  jogamp.opengl.gl4.GL4bcImpl.dispatch_glCompileShader1(IJ)V (0 bytes) @ 0x00007f74f9a380f8 [0x00007f74f9a380c0+0x38]
J 4021 C1 jogamp.opengl.gl4.GL4bcImpl.glCompileShader(I)V (44 bytes) @ 0x00007f74f9a447ac [0x00007f74f9a43de0+0x9cc]

or

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 4300  jogamp.opengl.gl4.GL4bcImpl.dispatch_glLinkProgram1(IJ)V (0 bytes) @ 0x00007fba38f70838 [0x00007fba38f70800+0x38]
J 4299 C1 jogamp.opengl.gl4.GL4bcImpl.glLinkProgram(I)V (44 bytes) @ 0x00007fba38f719b4 [0x00007fba38f70fe0+0x9d4]

I can not reproduce the error, everything works fine most of the time. But in some cases, the application just crashes and the JVM produces this kind of logs.

Have you ever seen this behavior ? How to avoid this ?
Reply | Threaded
Open this post in threaded view
|

Re: Not reproductible GL4bcImpl error with shaders program

gouessej
Administrator
Hi

Do you reproduce this bug on several computers?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Not reproductible GL4bcImpl error with shaders program

tartox
No, until now I just run the app on a Linux machine. What puzzles me is that it works 99% of the time. But the remaining 1% is really annoying as it suddenly crashes with no explanation, I tried to log glErrors but no luck.
Reply | Threaded
Open this post in threaded view
|

Re: Not reproductible GL4bcImpl error with shaders program

tartox
Hello
I keep getting those errors, and I have observed it on another machine.
Here is the last one this morning for instance. It seems it is finally not related to shaders.
It seems similar to this one.

To give more details: we have a server with different offscreen renderers. Each renderer is always accessed only from one thread,  but we have several renderers running in parallel on different threads.

Any advice most welcome.

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f9bc2ad6503, pid=17330, tid=140306903430912

....

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 5734  jogamp.opengl.gl4.GL4bcImpl.dispatch_glTexImage2D1(IIIIIIIILjava/lang/Object;IZJ)V (0 bytes) @ 0x00007f9be9ef3a4e [0x00007f9be9ef39c0+0x8e]
J 5733 C1 jogamp.opengl.gl4.GL4bcImpl.glTexImage2D(IIIIIIIILjava/nio/Buffer;)V (126 bytes) @ 0x00007f9be9ef271c [0x00007f9be9ef1a40+0xcdc]
J 7125 C1 com.jogamp.opengl.FBObject$TextureAttachment.initialize(Lcom/jogamp/opengl/GL;)Z (419 bytes) @ 0x00007f9bea3bccf4 [0x00007f9bea3bbd80+0xf74]
J 7606 C1 com.jogamp.opengl.FBObject.attachColorbufferImpl(Lcom/jogamp/opengl/GL;ILcom/jogamp/opengl/FBObject$Colorbuffer;)Lcom/jogamp/opengl/FBObject$Colorbuffer; (354 bytes) @ 0x00007f9bea5d6ad4 [0x00007f9bea5d68c0+0x214]
J 7114 C1 jogamp.opengl.GLFBODrawableImpl.setupFBO(Lcom/jogamp/opengl/GL;IIIIZIIZZZ)V (396 bytes) @ 0x00007f9bea3ac564 [0x00007f9bea3ab540+0x1024]
J 7984 C1 jogamp.opengl.GLFBODrawableImpl.initialize(ZLcom/jogamp/opengl/GL;)V (530 bytes) @ 0x00007f9bea73f604 [0x00007f9bea73d6c0+0x1f44]
J 7237 C1 jogamp.opengl.GLFBODrawableImpl.associateContext(Lcom/jogamp/opengl/GLContext;Z)V (10 bytes) @ 0x00007f9bea3ea874 [0x00007f9bea3ea740+0x134]
J 8905 C2 jogamp.opengl.GLContextImpl.makeCurrent(Z)I (986 bytes) @ 0x00007f9beaae4ce0 [0x00007f9beaae45a0+0x740]
J 9739 C2 jogamp.opengl.GLContextImpl.makeCurrent()I (6 bytes) @ 0x00007f9be99329d4 [0x00007f9be99329a0+0x34]
J 9204 C1 jogamp.opengl.GLDrawableHelper.invokeGLImpl(Lcom/jogamp/opengl/GLDrawable;Lcom/jogamp/opengl/GLContext;Ljava/lang/Runnable;Ljava/lang/Runnable;)V (579 bytes) @ 0x00007f9beac3cbfc [0x00007f9beac3c580+0x67c]
J 8558 C1 jogamp.opengl.GLDrawableHelper.invokeGL(Lcom/jogamp/opengl/GLDrawable;Lcom/jogamp/opengl/GLContext;Ljava/lang/Runnable;Ljava/lang/Runnable;)V (76 bytes) @ 0x00007f9bea5cfc44 [0x00007f9bea5cfb80+0xc4]
J 9547 C1 jogamp.opengl.GLAutoDrawableBase.defaultDisplay()V (223 bytes) @ 0x00007f9be98f1b0c [0x00007f9be98f0a20+0x10ec]
J 9200 C1 com.jogamp.opengl.GLAutoDrawableDelegate.display()V (5 bytes) @ 0x00007f9beac3a6f4 [0x00007f9beac3a600+0xf4]
Reply | Threaded
Open this post in threaded view
|

Re: Not reproductible GL4bcImpl error with shaders program

gouessej
Administrator
Hi

If each thread is a kernel thread, i.e it has its own (heavyweight) process, then you have several processes accessing OpenGL at the same time. I don't know what you're sharing and what you mean by "renderer". You can only have a single process or thread communicating with OpenGL at a time even though you can share an OpenGL context on several processes or threads under GNU Linux.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Not reproductible GL4bcImpl error with shaders program

tartox
By "renderer" I meant a GLEventListener.
There is only one process, but this portion of code below can be called by different (Java) threads: there is one different offscreen drawing per thread. The errors I observed are always thrown in the init() method of the GLEventListener.

AbstractGraphicsDevice device = GLProfile.getDefaultDevice();

GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory();
GLProfile profile = GLProfile.getGL2GL3(device);
GLCapabilities capabilities = new GLCapabilities(profile);
capabilities.setBackgroundOpaque(false);
capabilities.setOnscreen(false);
capabilities.setFBO(true);
                                       
GLOffscreenAutoDrawable drawable = factory.createOffscreenAutoDrawable(device, capabilities, null, width, height);
                       
mRenderer = new MyGLEventListener(); // implementation of GLEventListener
drawable.addGLEventListener(mRenderer);
drawable.display();


Does it look incorrect ?

Reply | Threaded
Open this post in threaded view
|

Re: Not reproductible GL4bcImpl error with shaders program

gouessej
Administrator
I see nothing wrong in your snippet. I suggest you to provide a tiny SSCCE to give us a chance to find the culprit.
Julien Gouesse | Personal blog | Website