Java fails upon RRA Setup

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Travis Peterson
Posts: 19
Joined: Mon Sep 21, 2009 11:09 am

Java fails upon RRA Setup

Post by Travis Peterson » Tue Jun 01, 2010 12:10 pm

When loading the RRA setup files I've created by editing the examples given, an error appears that says, "Java(TM) Platform SE binary has stopped working" wherein the program closes. Does anybody have any thoughts/ideas on how to fix this?

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

RE: Java fails upon RRA Setup

Post by Ayman Habib » Tue Jun 01, 2010 12:27 pm

Travis,

If you hand edited the setup files it's possible that the file got corrupted somehow. This is the likely cause especially if the file you started from was from an earlier version of OpenSim since many assumptions built into the file make sense only for a specific "Document Version" number at the top. At any rate, I think we should handle these issues more gracefully so please file a bug report and attach the file.

In the meantime, when the Java VM crashes, it creates a file hs_err_* file with stacktrace. You should find this file either in the installation directory of OpenSim or the folder where you were loading the setup file from (depending on where the crash happened). Please attach this file to the bug report.

Other things you can do:
- Set the value in Edit->Preferences->Debug to 3.
This runs the code in a protected mode where more exceptions are caught (at the expense of a bit slower operation). Then you'll get a stack-trace in a dialog that you can copy/see. You'll also get many more diagnostics/verbose logs in the message area so take a look there to see if anything stands out.
- If the setup file you're editing is from an earlier version you may want to save it in the latest version before editing.

Hope this helps,
-Ayman

User avatar
Travis Peterson
Posts: 19
Joined: Mon Sep 21, 2009 11:09 am

RE: Java fails upon RRA Setup

Post by Travis Peterson » Tue Jun 01, 2010 1:23 pm

Ayman -

I can't seem to find the error dialog that you mentioned in your reply. I've looked in my C:\OpenSim 2.0 folder from where I installed and the folder I was opening the setup file from. I'll keep looking and hope to get that bug reported as soon as I can find it. Also, you mentioned .xml versions. I'm not sure what you're talking about. I'm attaching the setup file below and hoping you can point out my error and exactly what should be changed. I'm using XML Marker version 1.1 to edit my .xml files.

<?xml version="1.0" encoding="UTF-8"?>
<CMCTool name="Neck3dof_6yo">
<defaults/>
<!--Name of the .osim file used to construct a model.-->
<model_file> Neck3dof_6yo_Simplified.osim </model_file>
<!--Replace the model's force set with sets specified in
<force_set_files>? If false, the force set is appended to.-->
<replace_force_set> true </replace_force_set>
<!--List of xml files used to construct an force set for the model.-->
<force_set_files> Neck3dof_6yo_TEST_RRA_Actuators.xml </force_set_files>
<!--Directory used for writing results.-->
<results_directory> ResultsRRA/ </results_directory>
<!--Output precision. It is 8 by default.-->
<output_precision> 20 </output_precision>
<!--Initial time for the simulation.-->
<initial_time> 0.00</initial_time>
<!--Final time for the simulation.-->
<final_time> 1.00 </final_time>
<!--Maximum number of integrator steps.-->
<maximum_number_of_integrator_steps> 20000 </maximum_number_of_integrator_steps>
<!--Maximum integration step size.-->
<maximum_integrator_step_size> 1e-004 </maximum_integrator_step_size>
<!--Integrator error tolerance. When the error is greater, the integrator
step size is decreased.-->
<integrator_error_tolerance> 1e-005 </integrator_error_tolerance>

<!--Flag (true or false) indicating whether or not to make an adjustment
in the center of mass of a body to reduced DC offsets in MX and MZ. If
true, a new model is writen out that has altered anthropometry.-->
<adjust_com_to_reduce_residuals> true </adjust_com_to_reduce_residuals>
<!--Name of the body whose center of mass is adjusted. The heaviest
segment in the model should normally be chosen. For a gait model, the
torso segment is usually the best choice.-->
<adjusted_com_body> skull </adjusted_com_body>
<!--Name of the output model file (.osim) containing adjustments to
anthropometry made to reduce average residuals. This file is written
if the property adjust_com_to_reduce_residuals is set to true. If a
name is not specified, the model is written out to a file called
adjusted_model.osim.-->
<output_model_file> Neck3dof_6yo_adjusted.osim </output_model_file>

<!--Motion (.mot) or storage (.sto) file containing the desired kinematic
trajectories.-->
<desired_kinematics_file> Neck3dof_6yo_RRA_DesiredKinematics.mot </desired_kinematics_file>
<!--Low-pass cut-off frequency for filtering the desired kinematics. A
negative value results in no filtering. The default value is -1.0, so
no filtering.-->
<lowpass_cutoff_frequency> 6 </lowpass_cutoff_frequency>
<!--File containing the tracking tasks. Which coordinates are tracked and
with what weights are specified here.-->
<task_set_file> Neck3dof_6yo_TEST_RRA_tasks.xml </task_set_file>
<!--File containing the constraints on the controls.-->
<constraints_file> Neck3dof_6yo_TEST_RRA_ControlConstraints.xml </constraints_file>

<!--Motion file (.mot) or storage file (.sto) containing the external
loads applied to the model.-->
<external_loads_file> Neck3dof_6yo_ExtLoads.mot </external_loads_file>
<!--Motion file (.mot) or storage file (.sto) containing the model
kinematics corresponding to the external loads.-->
<external_loads_model_kinematics_file> Pitch6yo.mot </external_loads_model_kinematics_file>
<!--Name of the body to which the first set of external loads should be
applied (e.g., the name of the right foot).-->
<external_loads_body1> skull</external_loads_body1>
<!--Name of the body to which the second set of external loads should be
applied (e.g., the name of the left foot).-->
<external_loads_body2> skull </external_loads_body2>
<!--Low-pass cut-off frequency for filtering the model kinematics
corresponding to the external loads. A negative value results in no
filtering. The default value is -1.0, so no filtering.-->
<lowpass_cutoff_frequency_for_load_kinematics> 6 </lowpass_cutoff_frequency_for_load_kinematics>

<!--Flag (true or false) indicating whether to use the fast CMC
optimization target. The fast target requires the desired
accelerations to be met. The optimizer fails if the acclerations
constraints cannot be met, so the fast target can be less robust. The
regular target does not require the acceleration constraints to be
met; it meets them as well as it can, but it is slower and less
accurate.-->
<use_fast_optimization_target> false </use_fast_optimization_target>
<!--Perturbation size used by the optimizer to compute numerical
derivatives. A value between 1.0e-4 and 1.0e-8 is usually
approprieate.-->
<optimizer_derivative_dx> 0.0001 </optimizer_derivative_dx>
<!--Convergence criterion for the optimizer. The smaller this value, the
deeper the convergence. Decreasing this number can improve a solution,
but will also likely increase computation time.-->
<optimizer_convergence_criterion> 1e-006 </optimizer_convergence_criterion>
<!--Maximum number of iterations for the optimizer.-->
<optimizer_max_iterations> 2000 </optimizer_max_iterations>
<!--Print level for the optimizer, 0 - 3. 0=no printing, 3=detailed
printing, 2=in between-->
<optimizer_print_level> 0 </optimizer_print_level>
<!--Specify which optimizer to use (ipopt or cfsqp).-->
<optimizer_algorithm> ipopt </optimizer_algorithm>

<!--Time window over which the desired forces are achieved.
Muscles forces cannot change instantaneously, so a finite time window
must be allowed. The recommended time window for RRA is about 0.001
sec, and for CMC is about 0.010 sec.-->
<cmc_time_window> 0.001 </cmc_time_window>
<!--Flag (true or false) indicating whether or not to use the curvature
filter. Setting this flag to true can reduce oscillations in the
computed muscle excitations.-->
<use_curvature_filter> false </use_curvature_filter>
<!--Flag (true or false) indicating whether or not to compute average
residuals. No actions are taken based on this flag other than printing
the average residuals, which can be useful for seeing if the solution
is good. Average residuals should be be close to 0.0. If not, there
is likely problem in the experimental data, in the model, or both.-->
<compute_average_residuals> true </compute_average_residuals>
<!--Flag (true or false) indicating whether or not to make an adjustment
in the center of mass of a body to reduced DC offsets in MX and MZ. If
true, a new model is writen out that has altered anthropometry.-->
</CMCTool>

Thanks,
Travis

User avatar
Travis Peterson
Posts: 19
Joined: Mon Sep 21, 2009 11:09 am

RE: Java fails upon RRA Setup

Post by Travis Peterson » Tue Jun 08, 2010 11:46 am

Could you elaborate on saving it in the "latest version"? Should I just put the files in via the GUI, then save the settings? Or write the .xml setup file again manually with different tags, headers, etc.?

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

RE: Java fails upon RRA Setup

Post by Ayman Habib » Tue Jun 08, 2010 12:08 pm

Hi Travis,

Yes, saving the settings file in the GUI will automatically save it in the latest format.

-Ayman

User avatar
Julian Atkinson
Posts: 52
Joined: Thu Feb 25, 2016 12:39 am

Re: Java fails upon RRA Setup

Post by Julian Atkinson » Tue Oct 25, 2016 6:42 am

Good day

I understand that this was posted a long time ago, however I am experiencing the same problem.

My question is:

The last point you make is to re-input the files and save the setup file rather than edit it manually. What about the Actuators, Constraints and tasks file? These are manually edited files?

Regards,
Julian

POST REPLY