Page 1 of 1

Matlab crashes when running RRATool

Posted: Tue Mar 30, 2021 1:24 pm
by edooley
Hello all,

I am trying to script my RRA in Matlab. I have written a script to set up the RRA Tool and I can print that set-up file from Matlab. If I load that RRA set-up file into the RRA Tool in the GUI and press run, OpenSim calculates as expected. However, if I attempt to run the tool in Matlab (RRATool.run()) Matlab initiates everything, then crashes.

Has anyone else experienced this? Does anyone have any ideas on why this might be happening?

In scripting other tools, if I crashed Matlab I would also have issues in the GUI and could debug that way. This is different.

Any ideas would be greatly appreciated.

Thanks,
Evan

Re: Matlab crashes when running RRATool

Posted: Tue Mar 30, 2021 4:48 pm
by tkuchida
It's very difficult to determine based on the information provided. To narrow down the issue, you can try writing a separate Matlab script that just loads the setup file you created and then runs RRA. If that also fails, my first guess would be that the model file you specified is incorrect or cannot be found (e.g., is a relative path that is not relative to Matlab's working directory). You could try replacing this with an absolute path. Note that, when you load a setup file in the GUI, the "model file" line in the setup file is ignored; the Tool will operate on whatever model has the focus in the GUI.

Re: Matlab crashes when running RRATool

Posted: Tue Mar 30, 2021 6:04 pm
by edooley
Thanks so much for the quick response.

Yep! Making a new RRATool object that was initiated with the made set-up file totally worked. Thanks for the tip!

I do also have the full path of the filename in the set-up file. I saw the note about that being a possible issue on github.

Thanks again,
Evan