Page 1 of 1

Crashing Matlab with Longer Simulations?

Posted: Mon Jun 20, 2022 9:16 am
by eadooley
Hello again,

I am working on running a muscle-driven MocoTrack simulation and had been getting this set-up by running just a short portion of the trial I would like to track (0.5 sec). I can get this simulation set-up and the simulation initializes and converges.

When I have tried simulating a longer piece (0.8-1 sec) Matlab is crashing unexpectedly at the end of initializing the study. I am not getting an error saying that memory is being filled and the printed OpenSim log doesn't have any errors listed in it.

Looking at the Matlab crash dump file I'm getting this error:

Code: Select all

Assertion in void __cdecl `anonymous-namespace'::mwJavaAbort(void) at B:\matlab\src\jmi\jmi\javainit.cpp line 1448: Fatal Java Exception.
Then the stack trace looks like it happens right after calling the osimJavaJNI.dll file that I know is needed for OpenSim and Matlab to communicate.

Code: Select all

Stack Trace (captured):
[  0] 0x00007ffb1bd19cb3 C:\Program Files\MATLAB\R2022a\bin\win64\libmwfl.dll+00761011
[  1] 0x00007ffb1bd18758 C:\Program Files\MATLAB\R2022a\bin\win64\libmwfl.dll+00755544
[  2] 0x00007ffb1bc67e5d C:\Program Files\MATLAB\R2022a\bin\win64\libmwfl.dll+00032349
[  3] 0x00007ffb1bc667b1 C:\Program Files\MATLAB\R2022a\bin\win64\libmwfl.dll+00026545
[  4] 0x00007ffb1bc6bf3b C:\Program Files\MATLAB\R2022a\bin\win64\libmwfl.dll+00048955
[  5] 0x00007ffad6d530a0   C:\Program Files\MATLAB\R2022a\bin\win64\jmi.dll+00667808
[  6] 0x0000000057029ead C:\Program Files\MATLAB\R2022a\sys\java\jre\win64\jre\bin\server\jvm.dll+02727597
[  7] 0x000000005701208b C:\Program Files\MATLAB\R2022a\sys\java\jre\win64\jre\bin\server\jvm.dll+02629771
[  8] 0x000000005702ac26 C:\Program Files\MATLAB\R2022a\sys\java\jre\win64\jre\bin\server\jvm.dll+02731046
[  9] 0x000000005702f52d C:\Program Files\MATLAB\R2022a\sys\java\jre\win64\jre\bin\server\jvm.dll+02749741
[ 10] 0x00000000570c5d98 C:\Program Files\MATLAB\R2022a\sys\java\jre\win64\jre\bin\server\jvm.dll+03366296
[ 11] 0x00007ffb3ad61eef                      C:\WINDOWS\SYSTEM32\ntdll.dll+00663279
[ 12] 0x00007ffb3ad2aad9                      C:\WINDOWS\SYSTEM32\ntdll.dll+00436953
[ 13] 0x00007ffb3ad60b5e                      C:\WINDOWS\SYSTEM32\ntdll.dll+00658270
[ 14] 0x00007ffaa87a49e2         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+04803042
[ 15] 0x00007ffaa8723005         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+04272133
[ 16] 0x00007ffaa8719c81         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+04234369
[ 17] 0x00007ffaa858a425         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02597925
[ 18] 0x00007ffaa873824b         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+04358731
[ 19] 0x00007ffaa85eae3b         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02993723
[ 20] 0x00007ffaa85ae65b         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02745947
[ 21] 0x00007ffaa8578377         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02524023
[ 22] 0x00007ffaa851893c         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02132284
[ 23] 0x00007ffaa851864b         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02131531
[ 24] 0x00007ffaa84efd79         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+01965433
[ 25] 0x00007ffaa852f9e8         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02226664
[ 26] 0x00007ffaa8532a89         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02239113
[ 27] 0x00007ffaa8533adf         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02243295
[ 28] 0x00007ffaa853e8b1         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+02287793
[ 29] 0x00007ffaa84298f1         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+01153265
[ 30] 0x00007ffaa8420e8f         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+01117839
[ 31] 0x00007ffaa83b5e68         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+00679528
[ 32] 0x00007ffaa83b430d         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+00672525
[ 33] 0x00007ffaa833dae5         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+00187109
[ 34] 0x00007ffaa833cd13         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+00183571
[ 35] 0x00007ffaa833c9d5         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+00182741
[ 36] 0x00007ffaa833bcfb         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+00179451
[ 37] 0x00007ffaa8813220         C:\OpenSim 4.3\bin\casadi_nlpsol_ipopt.dll+05255712
[ 38] 0x00007ffaac6a6978                      C:\OpenSim 4.3\bin\casadi.dll+02713976
[ 39] 0x00007ffaac61f589                      C:\OpenSim 4.3\bin\casadi.dll+02160009
[ 40] 0x00007ffaac5ec0f3                      C:\OpenSim 4.3\bin\casadi.dll+01949939
[ 41] 0x00007ffaac5e9bc5                      C:\OpenSim 4.3\bin\casadi.dll+01940421
[ 42] 0x00007ffaac5e9b97                      C:\OpenSim 4.3\bin\casadi.dll+01940375
[ 43] 0x00007ffaac5ec5c6                      C:\OpenSim 4.3\bin\casadi.dll+01951174
[ 44] 0x00007ffaac5f8434                      C:\OpenSim 4.3\bin\casadi.dll+01999924
[ 45] 0x00007ffaadce1b42                    C:\OpenSim 4.3\bin\osimMoco.dll+01317698
[ 46] 0x00007ffaadccbdaf                    C:\OpenSim 4.3\bin\osimMoco.dll+01228207
[ 47] 0x00007ffaadcbcf0d                    C:\OpenSim 4.3\bin\osimMoco.dll+01167117
[ 48] 0x00007ffaadc8572c                    C:\OpenSim 4.3\bin\osimMoco.dll+00939820
[ 49] 0x00007ffaadc4fd63                    C:\OpenSim 4.3\bin\osimMoco.dll+00720227
[ 50] 0x00007ffaae1ec7bd                 C:\OpenSim 4.3\bin\osimJavaJNI.dll+03327933
[ 51] 0x0000012c92f49f2e                                   <unknown-module>+00000000 
The only thing that changes between the simulation that works and the simulations that are crashing Matlab is the states file being sent into the TrackTool. I have gone back and run inverse kinematics for just the time ranges I am interested in and then used the Analysis Tool in the GUI to print the states file I am sending in to try and rule out an formatting error in that file being the issue, but even going this way the crash is still happening.

Have any of you ever had this issue or something like this?

Any thoughts or advice would be appreciated.

Best,
Evan

Re: Crashing Matlab with Longer Simulations?

Posted: Mon Jun 20, 2022 9:28 pm
by nbianco
Hi Evan,

I've not seen this error before. After a quick Google, it seems like it could be related to outdated graphics drivers: https://www.mathworks.com/matlabcentral ... -i-open-it. Do you seen anything in the crash dump related to drivers, or no?

-Nick