VBO enable VM exception

The code:

public class HelloWorld extends SimpleGame{
    public static void main(String[] args) {
        HelloWorld app=new HelloWorld();
    protected void simpleInitGame() {
        Box b=new Box("My box",new Vector3f(0,0,0),new Vector3f(1,1,1));   

Makes this error:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x696

Current Java thread:
at org.lwjgl.opengl.GL12.nglDrawRangeElements(Native Method)
at org.lwjgl.opengl.GL12.glDrawRangeElements(Unknown Source)
at com.jme.renderer.lwjgl.LWJGLRenderer.draw(Unknown Source)
at com.jme.scene.TriMesh.draw(Unknown Source)
at com.jme.scene.Spatial.onDraw(Unknown Source)
at com.jme.scene.Node.draw(Unknown Source)
at com.jme.scene.Spatial.onDraw(Unknown Source)
at com.jme.renderer.lwjgl.LWJGLRenderer.draw(Unknown Source)
at com.jme.app.SimpleGame.render(Unknown Source)
at com.jme.app.BaseGame.start(Unknown Source)
at jmetest.TutorialGuide.HelloWorld.main(HelloWorld.java:18)

Dynamic libraries:
0x00400000 - 0x00406000 C:j2sdk1.4.2_04binjava.exe
0x77F50000 - 0x77FF7000 C:WINDOWSSystem32ntdll.dll
.... and many more other dll files.

This is after a fresh install of nVidia drivers. On the other hand, if I run HelloTriMesh, and put in the line


the HelloTriMesh program works correctly.

Any ideas?

I think I have hit the same problem few days ago, when I was enabling one of the VBOs and not enabling another. When I had a trimesh with vertices and normals, I had to enable these two to avoid crash. When I have added textures, I had to enable also texture VBO.


what is the variable ‘m’? Don’t see it in your code example.

Ah well, in any caseoriginally the thought was that we might want dynamic data in one area and vbos in another. In the last 2 months or so, I’m more in favor of just changing this to be a single VBO-on/off method with a int type expresssing the type of VBO to use (static vs dynamic) Perhaps I should pick that up as a next item…