When I loading a large scene (60 objects, 11k verts) at runtime, I get 25 ArrayIndexOutOfBoundsExceptions, all exactly the same:
May 10, 2023 7:30:22 AM class com.jme3.export.binary.BinaryImporter readObject(int id)
SEVERE: Exception
java.lang.ArrayIndexOutOfBoundsException: Index -97 out of bounds for length 4
at com.jme3.export.binary.ByteUtils.rightAlignBytes(ByteUtils.java:483)
at com.jme3.export.binary.BinaryInputCapsule.readInt(BinaryInputCapsule.java:834)
at com.jme3.export.binary.BinaryInputCapsule.readString(BinaryInputCapsule.java:1017)
at com.jme3.export.binary.BinaryInputCapsule.setContent(BinaryInputCapsule.java:234)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:340)
at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:510)
at com.jme3.export.binary.BinaryInputCapsule.readStringSavableMap(BinaryInputCapsule.java:700)
at com.jme3.scene.Spatial.read(Spatial.java:1630)
at com.jme3.scene.Geometry.read(Geometry.java:720)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:345)
at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:510)
at com.jme3.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:498)
at com.jme3.export.binary.BinaryInputCapsule.readSavableArrayList(BinaryInputCapsule.java:616)
at com.jme3.scene.Node.read(Node.java:768)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:345)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:245)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:128)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:112)
at com.jme3.export.binary.BinaryLoader.load(BinaryLoader.java:36)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:272)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:388)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:439)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:444)
at codex.dreamraid.Main.simpleInitApp(Main.java:65)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:240)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:139)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:221)
at java.base/java.lang.Thread.run(Thread.java:829)
The exceptions do not stop the program, and the scene seems to show up fine. The scene was exported from blender using gltf.
I don’t know if this has anything to do with issue, but when converting the scene from gltf to j3o, I got the following warnings:
Cannot create unique name for Spatial Cube.034 (Geometry): /Scene/Cube.034
Cannot create unique name for Spatial Cube.008 (Geometry): /Scene/Cube.008
Cannot create unique name for Spatial Cube.008 (Geometry): /Scene/Cube.008
Cannot create unique name for Spatial Cube.008 (Geometry): /Scene/Cube.008
Cannot create unique name for Spatial Cube.021 (Geometry): /Scene/Cube.021
Cannot create unique name for Spatial Cube.024 (Geometry): /Scene/Cube.024
Cannot create unique name for Spatial Cube.008 (Geometry): /Scene/Cube.008
Cannot create unique name for Spatial Cube.008 (Geometry): /Scene/Cube.008
Cannot create unique name for Spatial Cube.008 (Geometry): /Scene/Cube.008
Cannot create unique name for Spatial Cube.008 (Geometry): /Scene/Cube.008