jMonkeyEngine / jmonkeyengine

A complete 3-D game development suite written in Java.
http://jmonkeyengine.org
BSD 3-Clause "New" or "Revised" License
3.75k stars 1.12k forks source link

IllegalStateException from software skinning with zero weights per vertex #1309

Open stephengold opened 4 years ago

stephengold commented 4 years ago

@oxplay2 reported the following crash in SkinningControl (new animation system):

mar 14, 2020 9:56:14 AM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[main,5,main]
java.lang.IllegalStateException: Max weights per vert is incorrectly set!
at com.jme3.anim.SkinningControl.applySkinning(SkinningControl.java:464)
at com.jme3.anim.SkinningControl.softwareSkinUpdate(SkinningControl.java:446)
at com.jme3.anim.SkinningControl.controlRenderSoftware(SkinningControl.java:263)
at com.jme3.anim.SkinningControl.controlRender(SkinningControl.java:303)
at com.jme3.scene.control.AbstractControl.render(AbstractControl.java:118)

I'm guessing mesh.getMaxNumWeights() returned 0. He says the same scene renders fine with hardware skinning. Perhaps SkinningControl should simply skip over meshes without weights.

stephengold commented 4 years ago

Another possibility is that mesh had bone weights but mesh.maxNumWeights wasn't set correctly.

Scrappers-glitch commented 6 months ago

Any progress on this issue so far?

stephengold commented 6 months ago

@Scrappers-glitch not that I'm aware of. Note that the issue isn't assigned to anyone.