-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty file after saving experimental TRC file #1344
Comments
@mrrezaie This does not reproduce in either 4.4-dev or 4.3 on windows. Leaving as open for others to check. |
On Mac with 4.4-dev I don't get the Java errors, but the markers don't visualize when loading the saved TRC file. Tested on 4.3 and there were no issues. So something may have changed since 4.3. |
Meant to add: the saved file on 4.4-dev was not empty. Some of the formatting changed slightly, but the file contents look mostly the same. |
Please find the attached video: But, it doesn't always happen. |
Based on your video @mrrezaie, tried saving the file as "new.trc" (and "new1.trc") and was able to reproduce the error. But it doesn't happen consistently, as you say. I've saved the file several other times with different names (e.g., "subject01_walk1_test.trc") without error. |
I suspect the exception is related to parsing error that results in units being undefined. This could be due to minor formatting issues earlier in the header. I have a PR that forces the (cameraRate, frameRate, etc.) to be written as ints rather than doubles and that seems to work. |
@mrrezaie Can you check the artifact of the PR to see if the problem is fixed? Link here https://github.com/opensim-org/opensim-gui/actions/runs/2204484033 |
Waiting for feedback before merging @mrrezaie Thank you |
Sorry for the delayed response. The problem exists in this version (OpenSim-4.4-2022-04-21-f14248f-win64) java.lang.IllegalArgumentException: No enum class org.opensim.modeling.Units$UnitType with value 955 |
Thanks for testing @mrrezaie it's not clear if you're using a file that was previously saved/transformed or original/raw file. Please attach the file here. Ultimately if the tools can't read/parse the file then this is going nowhere, if the tools can then let me know to dig deeper on the GUI side. Thank you |
Hi, I tested the original TRC files associated with Gait2354_Simbody and Rajagopal models. Please note that the error appears occasionally (Sometimes I can save the file successfully). |
If the proposed fix isn't really fixing the problem or improving behavior then I'll close without merging and leave the issue open until we can reproduce consistently. Please let me know @mrrezaie if you agree. |
That's fine. |
Since we can't reproduce consistently, will not merge the proposed hypothetical fix. Removing 4.4 milestone |
Seems to be fixed by recent changes. Thanks. |
Steps to reproduce
Expected result
Actual result
The saved file is empty and there is an Exception:
java.lang.IllegalArgumentException: No enum class org.opensim.modeling.Units$UnitType with value 771 at org.opensim.modeling.Units$UnitType.swigToEnum(Units.java:106) at org.opensim.modeling.Units.getType(Units.java:70) at org.opensim.view.experimentaldata.AnnotatedMotion.saveAsTRC(AnnotatedMotion.java:428) at org.opensim.view.experimentaldata.AnnotatedMotion.saveAs(AnnotatedMotion.java:393) at org.opensim.view.experimentaldata.ClassifyDataJPanel.saveTransformedMotion(ClassifyDataJPanel.java:271) at org.opensim.view.motions.MotionsSaveAsAction.saveMotion(MotionsSaveAsAction.java:45) at org.opensim.view.motions.MotionsSaveAsAction.performAction(MotionsSaveAsAction.java:80) at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:105) at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:70) at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:91) at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:74) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:102) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) 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:842) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) 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:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136) [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)
(This behavior usually happens, not always)
Environment and GUI version
V. 4.3
V. 4.4-2022-04-15-227322b
The text was updated successfully, but these errors were encountered: