Windows installation and DLL names

Hello ovito people,

when installing the ovito python module on a windows system (here: WinPython 3.12.4), then there is a high chance to run into DLL hell for the plugins.

On one of my machines (WinPython), the DLLs are located in
“C:\WinPython-3.12.4\python-3.12.4.amd64\Lib\site-packages\ovito\plugins”
and there are a lot of DLL names which would inevitably clash with already installed libraries on the system which are seen in the windows PATH. Take these for example:

ssh.dll
netcdf.dll
hdf5.dll
zlib.dll

On another system I use, everything works well, BUT on machines with lots of installed programs, the ovito initialization will then fail.

If I put the full ovito DLL path in the first position if the windows PATH, the ovito python module loads again but other programs won’t work anymore.

This could be solved easily by prefixing DLL names like “ov_zlib.dll” etc.

Is there a solution?

Thanks!

We are currently working on reproducing this issue on our end to find a solution. It seems to be a rather rare problem as you are the first to report it.As for your proposed solution, we will have to see what is possible. We can’t just rename the DLL files as the matching export libraries (.lib files) will also need to be changed accordingly. To do this, we have to adapt or modify the build processes of each of these third-party projects. This can be difficult or even impossible in individual cases.

Hi,
thank you for your response. I think the problem would have to do with the loader NOT REALLY checking from where the specific library loads.
Every dll load should be prefixed with …/plugins or similar,
otherwise this is what exists on my dev machine for zlib.dll only:

We have updated the OVITO pypi package and it will now explicitly load its DLLs from the plugins directory.

Please let us know if this fixes your DLL issues.

1 Like

Hi Daniel, thank you very much for your continued efforts.

Now the Ovito python module loads correctly on a system full of identically named DLLs, everything works well.

Best wishes!