Skip to content

InterpolationTest.gltf fails to load, crashes with "Inconsistent animation sampling" #2384

Open
@stephengold

Description

@stephengold

InterpolationTest.gltf has been included in the glTF-Sample-Assets test suite since its inception.
https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/InterpolationTest

When I try to load it using jme3-plugins, I get warnings followed by a crash:

Mar 05, 2025 10:33:28 AM com.jme3.scene.plugins.gltf.GltfLoader readAnimation
WARNING: JME only supports linear interpolation for animations
Mar 05, 2025 10:33:28 AM com.jme3.scene.plugins.gltf.GltfLoader readAnimation
WARNING: JME only supports linear interpolation for animations
com.jme3.asset.AssetLoadException: An error occurred loading InterpolationTest/glTF/InterpolationTest.gltf
	at com.jme3.scene.plugins.gltf.GltfLoader.loadFromStream(GltfLoader.java:181)
	at com.jme3.scene.plugins.gltf.GltfLoader.load(GltfLoader.java:107)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:274)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:390)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:441)
	at com.github.stephengold.wrench.test.CompareLoaders.loadModel(CompareLoaders.java:889)
	at com.github.stephengold.wrench.test.CompareLoaders.loadModel(CompareLoaders.java:855)
	at com.github.stephengold.wrench.test.CompareLoaders.onAction(CompareLoaders.java:496)
	at jme3utilities.ui.DefaultInputMode.onAction(DefaultInputMode.java:186)
	at com.jme3.input.InputManager.invokeActions(InputManager.java:174)
	at com.jme3.input.InputManager.onKeyEventQueued(InputManager.java:474)
	at com.jme3.input.InputManager.processQueue(InputManager.java:871)
	at com.jme3.input.InputManager.update(InputManager.java:923)
	at com.jme3.app.LegacyApplication.update(LegacyApplication.java:810)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:249)
	at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:707)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:797)
	at java.base/java.lang.Thread.run(Thread.java:840)

Caused by: com.jme3.asset.AssetLoadException: Inconsistent animation sampling 
	at com.jme3.scene.plugins.gltf.TrackData.checkTimesConsistency(TrackData.java:191)
	at com.jme3.scene.plugins.gltf.TrackData.update(TrackData.java:175)
	at com.jme3.scene.plugins.gltf.GltfLoader.readAnimation(GltfLoader.java:906)
	at com.jme3.scene.plugins.gltf.GltfLoader.loadFromStream(GltfLoader.java:162)
	... 17 more

I discovered issue while testing JME v3.8.0-alpha4. However, the behavior hasn't changed since at least JME v3.2.4-stable, so I don't consider this a regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions