RRA Scripting Crashes MATLAB

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Michelle Cullen
Posts: 1
Joined: Mon Jan 20, 2014 11:13 am

RRA Scripting Crashes MATLAB

Post by Michelle Cullen » Wed Oct 08, 2014 12:20 pm

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
Attachments
MATLAB RRA Crash Error.log
This is the file that is printed when MATLAB crashes when we attempt to set up the RRATool.
(32.78 KiB) Downloaded 60 times

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: RRA Scripting Crashes MATLAB

Post by jimmy d » Thu Oct 16, 2014 10:19 am

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?

User avatar
Adeliya Latypova
Posts: 1
Joined: Fri Feb 24, 2012 11:48 am

Re: RRA Scripting Crashes MATLAB

Post by Adeliya Latypova » Fri Nov 06, 2015 4:01 am

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

User avatar
Adam Yoder
Posts: 16
Joined: Thu Jul 19, 2012 4:24 pm

Re: RRA Scripting Crashes MATLAB

Post by Adam Yoder » Tue Oct 03, 2017 8:02 pm

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)

User avatar
yali liu
Posts: 8
Joined: Fri May 06, 2016 7:01 am

Re: RRA Scripting Crashes MATLAB

Post by yali liu » Tue Aug 06, 2019 2:45 am

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.
Attachments
process.gif
process.gif (20.88 KiB) Viewed 401 times
error.jpg
error.jpg (122.33 KiB) Viewed 401 times

POST REPLY