NullPointer Exception while updateFromHeightMap method of TerrainBlock class

hi guys, has anyone of you came across


java.lang.NullPointerException
at org.lwjgl.opengl.ARBBufferObject.glDeleteBuffersARB(ARBBufferObject.java:49)
at com.jme.scene.state.lwjgl.records.RendererRecord.deleteVBOId(RendererRecord.java:126)
at com.jme.renderer.lwjgl.LWJGLRenderer.deleteVBO(LWJGLRenderer.java:1694)
at com.jme.renderer.lwjgl.LWJGLRenderer.deleteVBO(LWJGLRenderer.java:1683)
at com.jmex.terrain.TerrainBlock.updateFromHeightMap(TerrainBlock.java:651)


it is thrown from the place where I call terrainBlock.updateFromHeightMap();

public void updateTerrainScale(Vector3f stepScale)
        {
           terrainBlock.setStepScale(stepScale);
           terrainBlock.updateFromHeightMap();
        }



I wanted to update terrainBlock after changing scaleVector. Do you know maybe how to deal with this ?

I found somwhere that this NPE thrown from deeply nested function in library is caused the most frequently by confusing threads. I changed code to make sure that this function updateFromHeight is called by OpenGL Thread but the NPE is still thrown. Any ideas? My changes:


GameTaskQueueManager.getManager().getQueue(GameTaskQueue.UPDATE).enqueue(new Callable<Object>() {

            @Override
            public Object call() throws Exception {
               ((MyImplementor)impl).updateTerrainScale(new Vector3f(panelNewMapMDA.getXScale(),panelNewMapMDA.getYScale(),panelNewMapMDA.getZScale()));
               return null;
            }
         });



Am I missing something more ? what more could be helpful to say to discover reason of this exception.

Greetings :)