java.lang.RuntimeException: Array index out of bounds.

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Erica Beaucage-Gauvreau
Posts: 49
Joined: Fri Apr 03, 2015 2:12 am

java.lang.RuntimeException: Array index out of bounds.

Post by Erica Beaucage-Gauvreau » Wed Jan 04, 2017 9:49 pm

Hi,

I have an error coming when trying to visualize my external forces acting on the model. I have never seen this message before and I am not sure what it means. I have a maximum of 6 forces acting on the model. I have attached to this email a copy of my force file (.mot).

I was wondering if anybody could help me shed some light on what the issue is. I am guessing there is also a problem when applying these forces on the model if I cannot view them. However, ID and SO have been running without any error!

Thank you,

Erica

java.lang.RuntimeException: Array index out of bounds.
at org.opensim.modeling.opensimModelJNI.ArrayInt_getitem(Native Method)
at org.opensim.modeling.ArrayInt.getitem(ArrayInt.java:103)
at org.opensim.view.motions.MotionDisplayer.applyStatesToModel(MotionDisplayer.java:597)
at org.opensim.view.motions.MotionDisplayer.applyTimeToModel(MotionDisplayer.java:554)
at org.opensim.view.motions.MotionDisplayer.applyTimeToModel(MotionDisplayer.java:557)
at org.opensim.view.motions.MasterMotionModel.applyTime(MasterMotionModel.java:96)
at org.opensim.view.motions.MasterMotionModel.setTime(MasterMotionModel.java:291)
at org.opensim.view.motions.MotionControlJPanel.update(MotionControlJPanel.java:710)
at java.util.Observable.notifyObservers(Observable.java:159)
at org.opensim.view.motions.MotionsDB.addMotion(MotionsDB.java:231)
at org.opensim.view.motions.MotionsDB.loadMotionStorage(MotionsDB.java:178)
at org.opensim.view.motions.MotionAssociateMotionAction.performAction(MotionAssociateMotionAction.java:82)
at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:129)
at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:126)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Attachments
Squat1.zip
(119.07 KiB) Downloaded 33 times

User avatar
Erica Beaucage-Gauvreau
Posts: 49
Joined: Fri Apr 03, 2015 2:12 am

Re: java.lang.RuntimeException: Array index out of bounds.

Post by Erica Beaucage-Gauvreau » Wed Jan 04, 2017 11:59 pm

Well it seems the title of the column has a maximum length and that was the problem! I went up to 16 characters and that seemed to be the limit. Hopefully that can save some debugging time to others if they encounter the same error!

POST REPLY