After updating to latest nightly:
The scene gets loaded, guinodes fine, particles fine, when meshes are -attached- I get:
java.nio.ReadWriteHeapByteBuffer cannot be cast to java.nio.FloatBuffer
Apologies - will have the full stack trace available later,
for now check:
com.jme3.renderer.android.OGLESSShaderRenderer.java : 1932
OGLESSShaderRenderer.setVertexAttrib(OGLESSShaderRenderer.java:2001)
…
Thanks
I have more than one mesh in the game, but a certain one crashes the game now. Before the last two JME updates the game was running fine on the testing device.
It is also important to note, this only happens on android, not on PC.
Trace as promised:
E/com.jme3.app.AndroidHarness(11570): SEVERE Exception thrown in Thread[GLThread 2887,5,main]
E/com.jme3.app.AndroidHarness(11570): java.lang.ClassCastException: java.nio.ReadWriteHeapByteBuffer cannot be cast to java.nio.FloatBuffer
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.android.OGLESShaderRenderer.updateBufferData(OGLESShaderRenderer.java:1932)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.android.OGLESShaderRenderer.setVertexAttrib(OGLESShaderRenderer.java:2001)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.android.OGLESShaderRenderer.setVertexAttrib(OGLESShaderRenderer.java:2072)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.android.OGLESShaderRenderer.renderMeshDefault(OGLESShaderRenderer.java:2318)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.android.OGLESShaderRenderer.renderMesh(OGLESShaderRenderer.java:2355)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.material.Material.render(Material.java:1067)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:523)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:322)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:374)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:763)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:719)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:983)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.renderer.RenderManager.render(RenderManager.java:1029)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.app.SimpleApplication.update(SimpleApplication.java:252)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.app.AndroidHarness.update(AndroidHarness.java:509)
E/com.jme3.app.AndroidHarness(11570): at com.jme3.system.android.OGLESContext.onDrawFrame(OGLESContext.java:349)
E/com.jme3.app.AndroidHarness(11570): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
E/com.jme3.app.AndroidHarness(11570): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
E/com.jme3.app.AndroidHarness(11570):
I can report a similar issue with the latest nightly, nothing specific to android though. I create a .j3o from a .scene animated file (works fine). But if I modify it (change translation or w.e) and try to save it, It just says “Saving File” in the bottom right and I get this exception: (this worked fine a couple of weeks ago):
[java]java.lang.ClassCastException: java.nio.HeapByteBufferR cannot be cast to java.nio.FloatBuffer
at com.jme3.scene.VertexBuffer.write(VertexBuffer.java:973)
at com.jme3.export.binary.BinaryExporter.processBinarySavable(BinaryExporter.java:375)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:720)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:733)
at com.jme3.export.binary.BinaryOutputCapsule.writeIntSavableMap(BinaryOutputCapsule.java:837)
at com.jme3.export.binary.BinaryOutputCapsule.writeIntSavableMap(BinaryOutputCapsule.java:388)
at com.jme3.scene.Mesh.write(Mesh.java:1317)
at com.jme3.export.binary.BinaryExporter.processBinarySavable(BinaryExporter.java:375)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:720)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:733)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:281)
at com.jme3.animation.SkeletonControl.write(SkeletonControl.java:685)
at com.jme3.export.binary.BinaryExporter.processBinarySavable(BinaryExporter.java:375)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:720)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:757)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:345)
at com.jme3.scene.Spatial.write(Spatial.java:1303)
at com.jme3.scene.Node.write(Node.java:589)
at com.jme3.export.binary.BinaryExporter.processBinarySavable(BinaryExporter.java:375)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:720)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:757)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:345)
at com.jme3.scene.Node.write(Node.java:590)
at com.jme3.export.binary.BinaryExporter.processBinarySavable(BinaryExporter.java:375)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:720)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:757)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:345)
at com.jme3.scene.Node.write(Node.java:590)
at com.jme3.export.binary.BinaryExporter.processBinarySavable(BinaryExporter.java:375)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:720)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:757)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:345)
at com.jme3.scene.Node.write(Node.java:590)
at com.jme3.export.binary.BinaryExporter.processBinarySavable(BinaryExporter.java:375)
at com.jme3.export.binary.BinaryOutputCapsule.write(BinaryOutputCapsule.java:720)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:757)
at com.jme3.export.binary.BinaryOutputCapsule.writeSavableArrayList(BinaryOutputCapsule.java:345)
at com.jme3.scene.Node.write(Node.java:590)
at com.jme3.export.binary.BinaryExporter.processBinarySavable(BinaryExporter.java:375)
at com.jme3.export.binary.BinaryExporter.save(BinaryExporter.java:184)
at com.jme3.gde.core.assets.AssetDataObject.saveAsset(AssetDataObject.java:236)
at com.jme3.gde.core.assets.SpatialAssetDataObject.saveAsset(SpatialAssetDataObject.java:110)
at com.jme3.gde.core.assets.AssetDataObject$1$1.call(AssetDataObject.java:93)
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.gde.core.scene.SceneApplication.update(SceneApplication.java:302)
at com.jme3.system.awt.AwtPanelsContext.updateInThread(AwtPanelsContext.java:188)
at com.jme3.system.awt.AwtPanelsContext.access$100(AwtPanelsContext.java:44)
at com.jme3.system.awt.AwtPanelsContext$AwtPanelsListener.update(AwtPanelsContext.java:68)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.runLoop(LwjglOffscreenBuffer.java:125)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:151)
at java.lang.Thread.run(Thread.java:662)[/java]
Edit: ok i have some more data. It appears only to be caused by .j3os from the ogre exporter that are animated. I have attached a simple testcase which is just a cube and 1 bone.
https://dl.dropboxusercontent.com/u/53339759/Nightly%20Animated%20.j3os.zip
To reproduce you can use these steps:
1 - Convert either the .scene or .mesh.xml into a .j3o
2 - Change the translation/location w.e
3 - Click save (Ctrl + Shift + S)
4 - Error
1 Like
The issue should be fixed in SVN now. The HW skinning patch was doing things its not supposed to be doing …
2 Likes
Ok cool, I thought it might have
will test when I’m home
Same here thanks so much!
Tested again - Resolved this.
yeh looks good to me, thx