Erroe: Failed to load OpenSim Libraries

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Deepak Singh
Posts: 6
Joined: Wed Feb 14, 2024 2:48 pm

Erroe: Failed to load OpenSim Libraries

Post by Deepak Singh » Wed Feb 28, 2024 2:32 pm

Hi there,
I am trying to run a Matlab script (which ran perfectly fine before) but now it is giving me the error shown in the picture attached to this request.

I checked for the osimJavaJNL.dll file in bin and it is there and the environment variable for file path C:\OpenSim 4.3\bin is also set in the computer. I did everything required to make scripting possible with MATLAB before too. I am facing this issue after OpenSim 3.3 was installed in the computer to be able to open older OpenSim models.
Attachments
Error.png
Error.png (14.47 KiB) Viewed 661 times

Tags:

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

Re: Erroe: Failed to load OpenSim Libraries

Post by Ayman Habib » Thu Feb 29, 2024 1:48 pm

Hi Deepak,

While a little bit surprising, it's not totally unexpected because of the way Windows resolves libraries/DLLs based on one single common PATH environment variable. What likely happened is that 3.3 added the path to the 3.3 distribution to the front of the common PATH environment variable and now launching the 4.3 version, windows finds the 3.3 version first and gets stuck. Our recent installers of version 4.0+ do not volunteer to modify the Path as such allowing you to have more than one self contained installation on your machine. OpenSim 3.3 did that to facilitate Matlab usage but it wasn't necessary for GUI operation. The solution is to remove the OpenSim 3.3 from the front of the Path and everything should work (assuming you're not using version 3.3 in Matlab or Python).

Please let us know if that solves the problem and if you're able to use OpenSim moving forward.

Best regards,
-Ayman

POST REPLY