A java.lang.IndexOutOfBoundsException exception has occurred. can someone explain this to me and what I should consider because I'm unsure of what to fix or how to go about it.
java.lang.IndexOutOfBoundsException: Index: 251, Size: 210
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at org.opensim.threejs.ModelVisualizationJson.updatePathWithWrapping(ModelVisualizationJson.java:1505)
at org.opensim.threejs.ModelVisualizationJson.appendToFrame(ModelVisualizationJson.java:793)
at org.opensim.threejs.ModelVisualizationJson.createFrameMessageJson(ModelVisualizationJson.java:714)
at org.opensim.view.pub.ViewDB.updateModelDisplayNoRepaint(ViewDB.java:864)
at org.opensim.view.motions.MasterMotionModel.doUpdateAndRepaint(MasterMotionModel.java:82)
at org.opensim.view.motions.MasterMotionModel.applyTime(MasterMotionModel.java:98)
at org.opensim.view.motions.MasterMotionModel.setTime(MasterMotionModel.java:287)
at org.opensim.view.motions.MotionControlJPanel.update(MotionControlJPanel.java:698)
at java.util.Observable.notifyObservers(Observable.java:159)
at org.opensim.view.motions.MotionsDB.setCurrent(MotionsDB.java:267)
at org.opensim.view.motions.MotionsDB.addMotion(MotionsDB.java:238)
at org.opensim.tracking.IKToolModel.updateMotion(IKToolModel.java:213)
at org.opensim.tracking.IKToolModel.access$500(IKToolModel.java:53)
at org.opensim.tracking.IKToolModel$IKToolWorker.finished(IKToolModel.java:164)
at org.opensim.swingui.SwingWorker$1.run(SwingWorker.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
java.lang.IndexOutOfBoundsException when running Inverse Kinematics
- Quinten Humphrey
- Posts: 36
- Joined: Mon Feb 08, 2021 2:36 pm
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
Re: java.lang.IndexOutOfBoundsException when running Inverse Kinematics
Hi Quinten,
I have seen similar issue in the past with a model that was assembled from multiple models and so was too complicated and rather impossible to debug (other than finding out that it's an issue with visualization of a complicated muscle wrapping). This should have no effect on IK solution or downstream calculations, though. if you can reproduce the issue with a simple model/muscle/wrapping then I'd be happy to look into it, in which case please file a bug report and attach the simple model and a description for how to reproduce the issue so we can investigate.
Best regards,
-Ayman
I have seen similar issue in the past with a model that was assembled from multiple models and so was too complicated and rather impossible to debug (other than finding out that it's an issue with visualization of a complicated muscle wrapping). This should have no effect on IK solution or downstream calculations, though. if you can reproduce the issue with a simple model/muscle/wrapping then I'd be happy to look into it, in which case please file a bug report and attach the simple model and a description for how to reproduce the issue so we can investigate.
Best regards,
-Ayman
- John Davis
- Posts: 60
- Joined: Mon Aug 26, 2019 7:42 am
Re: java.lang.IndexOutOfBoundsException when running Inverse Kinematics
This error log looks very similar to a visualizer error I encountered when trying to port a SIMM model to OpenSim. I am able to trigger the error with a simple model that has a single muscle that wraps over both an ellipsoid and through a torus. I have a reproducible example posted here on my GitHub if that's helpful. I've also filed an issue here that reports this bug.
As Ayman commented, it seems like this is purely a visualizer error, since in my case OpenSim still happily computes muscle moment arms without any problems, despite the error.
As Ayman commented, it seems like this is purely a visualizer error, since in my case OpenSim still happily computes muscle moment arms without any problems, despite the error.