Xith crashes if only 1 Shape3D added

Hello everyone,

I’ve got a Dell Inspiron 8500 notebook with a P4 2.4 Ghz cpu running Windows XP, and my video card is:

OpenGL Renderer = GeForce4 4200 Go/AGP/SSE2
OpenGL Version = 1.4.0
OpenGL Vendor = NVIDIA Corporation

I’ve been able to run some demoes, but not others, and so I’m trying to figure out what’s wrong.

Interestingly, I was able to run the Xith3DCollisionDropTest demo, but not the Xith3DSphereMotionLightingTest demo, which is opposite what I would expect to happen. Basically, the sphere would render about 50 times or so, and then it would disappear and a dialog box would appear:
Runtime Error!

Program: C:…\bin\javaw.exe

abnormal program termination

So I started removing code from the Xith3DCollisionDropTest to see if I could cause it to crash also. I found that after removing all of the geometry except either a cube or a sphere the program would crash giving the same error as above. If I have a cube AND a sphere it would run just fine, but if I only have 2 spheres it crashes or if I only have 2 cubes it crashes. So adding a cube to the Xith3DSphereMotionLightingTest fixes the problem. Any idea what may be the cause of this?

Also, I am going to be writing some applications that use spheres and cylinders, and I noticed that there is a TestUtils class that has a method createSphere(float R, int divisions)that creates spheres using triangles. Is there a way to create spheres in Xith3D using OpenGL quadrics instead, and how would this effect performance if you could?

Also I have attached another error that I have seen while running Xith3D. Looks like a JOGL problem?

Thanks for any help.

Jason Cheatham

net.java.games.jogl.GLException: Error swapping buffers
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers(WindowsOnscreenGLContext.java:140)
at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:193)
at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:1010)
at com.xith3d.scenegraph.View.renderOnce(View.java:732)
at com.xith3d.scenegraph.View.renderOnce(View.java:665)
at Xith3DCollisionDropTestStripped.runTest(Xith3DCollisionDropTestStripped.java:326)
at Xith3DCollisionDropTestStripped.init(Xith3DCollisionDropTestStripped.java:306)
at Xith3DCollisionDropTestStripped.main(Xith3DCollisionDropTestStripped.java:379)

Do you get the same error, if you use the latest graphics drivers? Is " abnormal program termination" the only error message you get?

Hi Jens,

I just updated the graphics drivers and I still get the same error. The title of the dialog box is:
Microsoft Visual C++ Runtime Library

Runtime Error!

Program: C:…\bin\javaw.exe

abnormal program termination

There are no exceptions that go to standard output. Do you know of any way to get a more detailed error message?

Thanks,

Jason

So, I set up the Xith3D source code in Eclipse, which is really awesome to be able to do by the way, and started debugging the application.

After the 62nd time that View.renderOnce() is called it crashes. I followed the method calls and found that it crashes in the CanvasPeerImpl’s render(RenderFrame frame) method and I’ve marked the line below:

public void render(RenderFrame frame) {
ProfileTimer.startProfile(“CanvasPeerImpl::render”);


if ((renderingThread != null) && (Thread.currentThread() != renderingThread))
throw new Error(“Pick initiated not from rendering thread”);
canvas.display();
}
else
canvas.display(); // Crashes on this line!!!
ProfileTimer.endProfile();
}

The canvas object is of type GLCanvas, and it is breaking on the display() method. The CanvasPeerImpl class implements GLEventListener and calls canvas.addGLEventListener(this); in the constructor, and so the cavas.display() call is just in turn calling the CanvasPeerImpl’s display() method. So this must be a JOGL problem?

Thanks for any help,

Jason

Can you try to run different demos with:

java -DXITH3D_USE_VERTEX_BUFFER_CACHING=FALSE SomeDemo

If you have a 5xxx driver version there shouldn’t be a problem, but it’s still worth a try. Which version of Xith3D are you running?

java -DXITH3D_USE_VERTEX_BUFFER_CACHING=FALSE SomeDemo

That did the trick! :slight_smile: I was able to run all of the demoes which is great. What does that mean with Java Web Start though? Is there a way to detect if the graphics card needs vertex buffer caching turned off in order to run correctly so that the demoes run from JWS?

Thanks,

Jason Cheatham

The best way would be to do some graphics card and driver detection in Xith3D, so the default options can be changed, if there is a known bug. I thought this was already done.(?)

You can turn it off in Webstart by using

<property name="XITH3D_USE_VERTEX_BUFFER_CACHING" value="false" />

but this disables vertex buffer caching for everyone (can reduce performance).

Btw. what is your exact driver version? The vertex buffer problem appeared only on NVidia drivers before 5xxx. Maybe there is now a new Windows driver, which has this problem again.

I got the latest version of the driver from Dell, and I think I installed it correctly, but it is version:
4.4.8.7

The latest version is from 9/18/2003, so it’s too bad they haven’t got a more recent update.

Thanks for your help.

Jason

You may try the brand new drivers from Nvidia:
http://www.nvidia.com/object/winxp_2k_56.64

For me this fixed a somewhat related problem that resulted in crashing my xith based demo on a GF3.

As a second benefit you will get OpenGL® 1.5 support.