hello, i was using the old version of jme3test.terrain.TerrainTestCollision and i have found the following bug.
I get :
Exception in thread “jME Terrain Thread” java.lang.NullPointerException
at com.jme3.terrain.geomipmap.TerrainQuad.calculateLod(TerrainQuad.java:441)
at com.jme3.terrain.geomipmap.TerrainQuad.calculateLod(TerrainQuad.java:437)
at com.jme3.terrain.geomipmap.TerrainQuad.calculateLod(TerrainQuad.java:437)
at com.jme3.terrain.geomipmap.TerrainQuad$UpdateLOD.run(TerrainQuad.java:382)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Reason : this happens because the old test didn’t contain the line :
control.setLodCalculator( new DistanceLodCalculator(65, 2.7f) ); // patch size, and a multiplier
solutions :
- default value.
- check for null.
- or alternative throw a more descriptive exception for why this happened.