glDrawArrays crashes Java but only on client's machine

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

glDrawArrays crashes Java but only on client's machine

imakerobots
Sorry this isn't a fully fleshed out bug report.  I still suspect it's something I'm doing, but I hope that someone might have a clue what I've done.  

Windows 11, Jogamp 2.5.0, Java 21.  Client says their video card is NVidia GeForce GTX 1080 Ti with dedicated 27,536 Mb Mem

My log file says...

09:33:15.744 [AWT-EventQueue-0] INFO  c.m.ro3.apps.render.OpenGLPanel - availability=Natives[
 GL4bc true [4.6 (Compat profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
 GL4 true [4.6 (Core profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
 GLES3 false,
 GL3bc true [4.6 (Compat profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
 GL3 true [4.6 (Core profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
 GL2 true [4.6 (Compat profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware)],
 GLES2 false,
 GLES1 false, count 5 / 8],
 Common[, GL4ES3 true, GL2GL3 true, GL2ES2 true, GL2ES1 true],
 Mappings[GL3bc GLProfile[GL3bc/GL4bc.hw],
 GL2ES1 GLProfile[GL2ES1/GL4bc.hw],
 GL4ES3 GLProfile[GL4ES3/GL4.hw],
 GL2ES2 GLProfile[GL2ES2/GL4.hw],
 GL4bc GLProfile[GL4bc/GL4bc.hw],
 GL2 GLProfile[GL2/GL4bc.hw],
 GL4 GLProfile[GL4/GL4.hw],
 GL3 GLProfile[GL3/GL4.hw],
 GL2GL3 GLProfile[GL2GL3/GL4bc.hw],
 ,
 default GLProfile[GL4bc/GL4bc.hw],
 count 9 / 12]
09:33:15.745 [AWT-EventQueue-0] INFO  c.m.ro3.apps.render.OpenGLPanel - capabilities=rgba 8/8/8/1,
 opaque,
 accum-rgba 0/0/0/0,
 dp/st/ms 16/8/4,
 sample-ext default,
 dbl,
 mono  ,
 hw,
 GLProfile[GL4bc/GL4bc.hw],
 on-scr[.]

then creates the canvas, calls init... and then in display it dies with the attached crash report: hs_err_pid9836.log

Specifically...

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  jogamp.opengl.gl4.GL4bcImpl.dispatch_glDrawArrays1(IIIJ)V+0
j  jogamp.opengl.gl4.GL4bcImpl.glDrawArrays(III)V+45
j  com.marginallyclever.ro3.mesh.Mesh.render(Lcom/jogamp/opengl/GL3;II)V+166
j  com.marginallyclever.ro3.mesh.Mesh.render(Lcom/jogamp/opengl/GL3;)V+32
j  com.marginallyclever.ro3.apps.render.renderpasses.DrawBackground.drawSkybox(Lcom/jogamp/opengl/GL3;Lcom/marginallyclever/ro3/node/nodes/Camera;)V+279
j  com.marginallyclever.ro3.apps.render.renderpasses.DrawBackground.draw(Lcom/marginallyclever/ro3/apps/render/Viewport;)V+116
j  com.marginallyclever.ro3.apps.render.Viewport.renderAllPasses()V+44
j  com.marginallyclever.ro3.apps.render.Viewport.display(Lcom/jogamp/opengl/GLAutoDrawable;)V+54

I don't think I'm doing anything too spicy with my draw arrays call... so... any idea what I'm doing wrong?

Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: glDrawArrays crashes Java but only on client's machine

gouessej
Administrator
Ensure that you handle the position of the direct NIO buffer correctly.

I advise you to run another program using JOGL. If it doesn't crash, it might indicate that the problem comes from your source code; if it crashes, it will confirm that something else is to blame. If your end user uses a laptop, please tell him/her to use the performance mode so that the machine doesn't try to modify the GPU in use at runtime (think about Optimus).
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: glDrawArrays crashes Java but only on client's machine

imakerobots
> Ensure that you handle the position of the direct NIO buffer correctly.

..how?  which buffer?

I have ruled out the possibility of a capabilities problem or an init() setting.

My end user is not on a laptop.

https://github.com/MarginallyClever/Robot-Overlord-App/tree/master is my code, fwiw.  we've tested versions going back three months and they all have the problem.  The main class is RO3.

The only other app I have is Makelangelo software but it's still in GL2, while RO runs in GL3.
Reply | Threaded
Open this post in threaded view
|

Re: glDrawArrays crashes Java but only on client's machine

gouessej
Administrator
Maybe there is a mismatch between the number of vertices passed to glDrawArrays and the indirect NIO buffer you create in setupArrays().

Does Sweethome3D work on this machine?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: glDrawArrays crashes Java but only on client's machine

imakerobots
We may have found the cause.

in the shader:

glsl#version 330 core

layout(location = 0) in vec3 aPosition;
layout(location = 1) in vec3 aNormal;
layout(location = 2) in vec4 aColor;
layout(location = 3) in vec2 aTexture;

and in the java:

        setupArray(gl,0,3,numVertexes,vertexArray);
        if(hasNormals ) setupArray(gl,1,3,numVertexes,normalArray );
        if(hasColors  ) setupArray(gl,2,4,numVertexes,colorArray  );
        if(hasTextures) setupArray(gl,3,2,numVertexes,textureArray);

made it work.  Previously setupArray() was using

        setupArray(gl,index++,3,numVertexes,vertexArray);
        if(hasNormals ) setupArray(gl,index++,3,numVertexes,normalArray );
        if(hasColors  ) setupArray(gl,index++,4,numVertexes,colorArray  );
        if(hasTextures) setupArray(gl,index++,2,numVertexes,textureArray);

and sometimes the index number didn't match the layout location.