Error in MonkeyZone client

hello all,
Noob Monkey here, with an issue running the Monkey Zone example.
After starting the server, and running the client. I can enter a username, and tell it to connect.
Then the client will show the next menu set , and if you select start game, a popup appears stating that it is loading the levels and creating the navmesh. During this time I receive the error.

java.lang.IllegalStateException: This control has already been added to a Spatial
at com.jme3.scene.control.AbstractControl.setSpatial(AbstractControl.java:58)
at com.jme3.animation.SkeletonControl.setSpatial(SkeletonControl.java:262)
at com.jme3.scene.Spatial.addControl(Spatial.java:602)
at com.jme3.animation.AnimControl.setSpatial(AnimControl.java:288)
at com.jme3.scene.Spatial.clone(Spatial.java:1186)
at com.jme3.scene.Node.clone(Node.java:565)
at com.jme3.scene.Node.clone(Node.java:60)
at com.jme3.scene.Spatial.clone(Spatial.java:1214)
at com.jme3.scene.Spatial.clone(Spatial.java:66)
at com.jme3.asset.CloneableAssetProcessor.createClone(CloneableAssetProcessor.java:48)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:327)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:374)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:378)
at com.jme3.monkeyzone.WorldManager.preloadModels(WorldManager.java:236)
at com.jme3.monkeyzone.ClientMain$6.run(ClientMain.java:362)
at java.lang.Thread.run(Thread.java:722)

Looking into the code I see that this is started when the worldmanager is trying to preload the models. Is there something that I haven’t downloaded ? or some other resource necessary?

Thanks in advance!

The answer to this specific problem is that the Models/Sinbad.j3o file is corrupted. Just right click on the Sinbad.mesh.xml and convert it to Sinbad.j3o. That should give you a good Sinbad.j3o.

@normen please make this correction to source files. :slight_smile: I’m working on fixing some launch bugs on MonkeyZone right now. :slight_smile:

@Pixelapp said: The answer to this specific problem is that the Models/Sinbad.j3o file is corrupted. Just right click on the Sinbad.mesh.xml and convert it to Sinbad.j3o. That should give you a good Sinbad.j3o.

@normen please make this correction to source files. :slight_smile: I’m working on fixing some launch bugs on MonkeyZone right now. :slight_smile:

I’ll check when I have my dev environment set up again. I think I remember the Sinbads had Controls attached in the j3o, so they would have to be added again, too.

Thank you for the info. Doing as instructed, I right a right click on sinbad.mesh.xml and told it to create the j30 file. this created sinbad.mesh.j30 which I then renamed to sinbad.j30.

I did get farther this time on startup, however still no joy.
here is the error log.

SEVERE: Exception
java.lang.NullPointerException
at com.jme3.monkeyzone.ClientMain$2.call(ClientMain.java:219)
at com.jme3.monkeyzone.ClientMain$2.call(ClientMain.java:213)
at com.jme3.app.AppTask.invoke(AppTask.java:142)
at com.jme3.app.Application.runQueuedTasks(Application.java:583)
at com.jme3.app.Application.update(Application.java:596)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:231)
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)

Jan 06, 2014 6:58:47 PM com.jme3.monkeyzone.WorldManager addEntity
INFO: Adding entity: 1
Jan 06, 2014 6:58:47 PM com.jme3.monkeyzone.WorldManager enterEntity
INFO: Player 0 entering entity 1
Jan 06, 2014 6:58:47 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.IllegalStateException: Cannot add UserInputControl to spatial without ManualControl!
at com.jme3.monkeyzone.controls.UserInputControl.setSpatial(UserInputControl.java:117)
at com.jme3.scene.Spatial.addControl(Spatial.java:602)
at com.jme3.monkeyzone.WorldManager.addUserControls(WorldManager.java:665)
at com.jme3.monkeyzone.WorldManager.enterEntity(WorldManager.java:561)
at com.jme3.monkeyzone.messages.ServerEnterEntityMessage.applyData(ServerEnterEntityMessage.java:60)
at com.jme3.network.physicssync.PhysicsSyncManager.doMessage(PhysicsSyncManager.java:158)
at com.jme3.network.physicssync.PhysicsSyncManager.update(PhysicsSyncManager.java:103)
at com.jme3.app.state.AppStateManager.update(AppStateManager.java:287)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:239)
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)

I will see if I can make heads or tails out of it…

You have to add a CharacterControl as well. I will commit a new j3o soon.