Jmetests - testhoveringtank

Anyone just TRY this testhovering tank demo, start it up and hit W to see if you get NaN’s with a blank screen? Don’t rotate or anything else first, just hit the forwards button after you run it, to see if you get a black screen too. Then please let me know what the fix could be.

Thanks.

When I do that in jME 3.0.4, I get a series of exceptions:

Jan 27, 2014 1:00:21 PM com.jme3.scene.plugins.ogre.MeshLoader load
WARNING: Cannot locate Models/HoverTank/Tank2.material for model Models/HoverTank/Tank2.mesh.xml
Jan 27, 2014 1:00:24 PM com.jme3.bullet.BulletAppState postRender
SEVERE: null
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at com.jme3.bullet.BulletAppState.postRender(BulletAppState.java:265)
	at com.jme3.app.state.AppStateManager.postRender(AppStateManager.java:312)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:254)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
	at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:228)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at com.bulletphysics.collision.shapes.TriangleShape.localGetSupportingVertexWithoutMargin(TriangleShape.java:98)
	at com.bulletphysics.collision.narrowphase.GjkPairDetector.getClosestPoints(GjkPairDetector.java:141)
	at com.bulletphysics.collision.narrowphase.DiscreteCollisionDetectorInterface.getClosestPoints(DiscreteCollisionDetectorInterface.java:69)
	at com.bulletphysics.collision.dispatch.ConvexConvexAlgorithm.processCollision(ConvexConvexAlgorithm.java:127)
	at com.bulletphysics.collision.dispatch.ConvexTriangleCallback.processTriangle(ConvexTriangleCallback.java:163)
	at com.bulletphysics.dom.HeightfieldTerrainShape.processAllTriangles(HeightfieldTerrainShape.java:212)
	at com.bulletphysics.collision.dispatch.ConvexConcaveCollisionAlgorithm.processCollision(ConvexConcaveCollisionAlgorithm.java:86)
	at com.bulletphysics.collision.dispatch.CompoundCollisionAlgorithm.processCollision(CompoundCollisionAlgorithm.java:120)
	at com.bulletphysics.collision.dispatch.DefaultNearCallback.handleCollision(DefaultNearCallback.java:55)
	at com.bulletphysics.collision.dispatch.CollisionDispatcher$CollisionPairCallback.processOverlap(CollisionDispatcher.java:236)
	at com.bulletphysics.collision.broadphase.HashedOverlappingPairCache.processAllOverlappingPairs(HashedOverlappingPairCache.java:190)
	at com.bulletphysics.collision.dispatch.CollisionDispatcher.dispatchAllCollisionPairs(CollisionDispatcher.java:247)
	at com.bulletphysics.collision.dispatch.CollisionWorld.performDiscreteCollisionDetection(CollisionWorld.java:150)
	at com.bulletphysics.dynamics.DiscreteDynamicsWorld.internalSingleStepSimulation(DiscreteDynamicsWorld.java:378)
	at com.bulletphysics.dynamics.DiscreteDynamicsWorld.stepSimulation(DiscreteDynamicsWorld.java:339)
	at com.jme3.bullet.PhysicsSpace.update(PhysicsSpace.java:330)
	at com.jme3.bullet.PhysicsSpace.update(PhysicsSpace.java:317)
	at com.jme3.bullet.BulletAppState$2.call(BulletAppState.java:132)
	at com.jme3.bullet.BulletAppState$2.call(BulletAppState.java:130)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	... 1 more

This is your issue, you can’t locate the model. usually the first message is at the top is the main reason. Did you install jme3 correctly? I’m using the latest stable version.

an 27, 2014 1:00:21 PM com.jme3.scene.plugins.ogre.MeshLoader load
WARNING: Cannot locate Models/HoverTank/Tank2.material for model Models/HoverTank/Tank2.mesh.xml

@drarem said: This is your issue, you can't locate the model. usually the first message is at the top is the main reason. Did you install jme3 correctly? I'm using the latest stable version.

I’ve been using JME3 for about 10 months now. Mostly it works for me. How can I determine whether I have it installed correctly?

I’m curious: have you by any chance tried to run this test yourself?

For what it’s worth, I’m sure sgold’s setup is probably right. At any rate, the warning has absolutely nothing to do with the issue.

I’m running some odd version of trunk at the moment (Running on jMonkeyEngine 3.x) and I just tried it. I was able to load and turn the tank but as soon as I try move forward the screen goes black.

Maybe there was an error fixed in bullet since 3.0.4 that wasn’t backported.

I installed the 64bit stable version, and yes when i try to move forward the screen also goes black.

SGold, there is some instruction somewhere to do a chmod +x… to your /usr/bin/jmonkey… folder. Not sure exactly what or where the command is. I did a sudo install on mine.

Has there been any update on this issue since January? I am having this problem with 3.0 stable release.

Sorry I missed this post, there is still the issue in lasted repo.
I’ll look into it

This is a very funny issue (the com.bulletphysics.collision.shapes.TriangleShape.localGetSupportingVertexWithoutMargin one) that apparently happens mainly on ATI cards when the physics vehicle is used and the physics update happens on a separate thread (and theres a blue moon).

It might have something to do with the deprecated PssmShadowRenderer. If I remove it, it appears to work correctly.

Also, I’ve noticed that this demo spawns the hovertank approximately 25 world units below the terrain.