Page 1 of 1

RRA Scripting Crashes MATLAB

Posted: Wed Oct 08, 2014 12:20 pm
by mkcullen631
We are attempting to run RRA through MATLAB. We are using the following command to set up the RRATool as a variable within MATLAB. Running this command causes a complete shutdown of MATLAB.

[genericSetupForRRA,genericSetupPathRRA,FilterIndex] = ...
uigetfile('*.xml','Pick the a generic setup file to for this subject/model as a basis for changes.');

The attached error file is printed when MATLAB crashes.

A previous post ("Matlab crashes when using RRATool in API") found that MATLAB crashed when the setModel() command was used. However, we are not even at the point of setting up the model; we are just trying to register the tool.

Is this an incorrect command to set up the RRATool? (We used a similar command for IK and ID.)

Thank you!
Michelle

Re: RRA Scripting Crashes MATLAB

Posted: Thu Oct 16, 2014 10:19 am
by jimmy
The command uigetfile is probably not causing the issue. It is a matlab function which generates some path variables for file you selected.

The log file suggests that you are having similar issue to the previous post.

Have you managed to make progress with this issue?

Re: RRA Scripting Crashes MATLAB

Posted: Fri Nov 06, 2015 4:01 am
by latypova
Recently I faced the same problem as described in the first post: the Matlab was crashing during the RRATool creation.

Initially, I used the *.xml setup file modified and saved using OpenSim GUI.
Comparing the unmodified generic setup file created by OpenSim and mine I found out, that my file is missing model_file name (line 5, <model_file/>). By adding this model_file name (<model_file>model_file.osim</model_file>) in .xml setup file, the RRATool could be successfully created in Matlab.
The current piece of code to call and run RRATool looks like this:

path = ['..\OpenSimFiles'];
modelFile = 'model_file.osim';
rraTool = RRATool([path '\Setup_RRA.xml']);
rraTool.setModelFilename(modelFile);
rraTool.run();

Hope it may help someone since I didn't find this answer on the forum!

Adeliya

Re: RRA Scripting Crashes MATLAB

Posted: Tue Oct 03, 2017 8:02 pm
by ajyoder
Since I was just experiencing the same problem of a hard MATLAB 2017b crash when calling RRAtool(), thought I'd share my solution

Issue was sourced to a lack of a valid model_file name in the generic XML file, however instead of modifying this, I left as is with a <model_file /> line, and specified instead the 2nd aLoadModel input argument, that forces no model to load initially

Per doxygen:
RRATool (const std::string &aFileName, bool aLoadModel=true) SWIG_DECLARE_EXCEPTION
rraTool = RRATool([path '\Setup_RRA.xml'],0);
rraTool.setModel(model) OR rraTool.setModelFileName(modelFileName)

Re: RRA Scripting Crashes MATLAB

Posted: Tue Aug 06, 2019 2:45 am
by zhuimeng628
hello, I also have a problem during using RRATool in matlab. my Matlab crashes during RRATool.run() when it using IPOPT optimizer algorithm.
but I do not know how to solve the problem.
If you have any suggestion, please share with me. Thank you very much
Best regards.