You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with Collada models (with lighting enabled), the ColladaMeshShape.createNormals() method throws an IllegalArgumentException intermittently. I looked at the code, and the offending line appears to be line 896: this.normalBuffer.position(this.normalBuffer.position() + thisSize);
It looks like the position specified by this.normalBuffer.position()+thisSize is not a valid position in some cases. I think this issue can be resolved by simply introducing a check to ensure the position is valid:
When working with Collada models (with lighting enabled), the
ColladaMeshShape.createNormals()
method throws anIllegalArgumentException
intermittently. I looked at the code, and the offending line appears to be line 896:this.normalBuffer.position(this.normalBuffer.position() + thisSize);
It looks like the position specified by
this.normalBuffer.position()+thisSize
is not a valid position in some cases. I think this issue can be resolved by simply introducing a check to ensure the position is valid:if(this.normalBuffer.limit() >= this.normalBuffer.position() + thisSize)
{
this.normalBuffer.position(this.normalBuffer.position() + thisSize);
}
It may also be a good idea to provide a similar check in the
ColladaMeshShape.createTexCoords()
method.The text was updated successfully, but these errors were encountered: