HDF5.dll not found, HDF.PInvoke, c#

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HDF5.dll not found, HDF.PInvoke, c#

markus croé

Hi guys,

i am stuck with a weird problem. I was able to get closer to a solution, but was in the end even more confused.

The situation and problem are as follows:

I have visual studio 2015 and wanted to use hdf5 to read newer files from matlab, so i took the HDF.PInvoke from NuGet which has version 1.10.1.

Everything worked fine, after a while of understanding how it loads the data and stuff, but there is one pc here in our office which has problems with it. I get the exception that the HDF5.dll is not being found. even though it is situated in the bin64 folder inside of the programs directory, along with the rest of its dependencies. I don't know whats going on there, but it even gets more interesting. As i tried to have a look on if it looks at the right place, it turned out it is, however it gives the message of not finding the file. Then i said ok, lets start with a basic program that only has the load method in it . If it does have problems with the library, even this should fail, right? Nope, this did work, even if i put the program in the same folder as the program that i want to work properly und use the same dependencies as my program. Ergo the binaries should be fine. And since the little load testing program worked with the same binaries on the pc that does not want to run my programs loading method, which is basically the same , i am quite clueless.

Now to the line where it crashes. The loading gets this exception in the line where i call    h5.open()    , and this even if i call it at the start of my program. On my pc everything is fine though and if i run the test program on the other laptop it will run as well.

I thought maybe there could be dlls conflicting, because the free library CsMatIO which reads older versions of matlabs mat-files does also use the zlib.dll, but it is also working if i include csmatio in the test program.

I also tested it with different pcs and there is pcs of win10 and win7 where it works. All pcs are 64bit systems.

The not working one is a win7, 64bit system.


Any help is appreciated.

Regards,

Markus


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: HDF5.dll not found, HDF.PInvoke, c#

markus croé

Ok, after a whole lot of testing and using an older pc that also has the same problem i discovered something strange.

The thing that solved the problem for me on the laptop of my colleague was installing the vcredist 2013. Installing the 2015 seems to not be sufficient. But it does not explain why on the same problematic laptop one solution that is a bit more complex is not working, but another solution that has only the loading implemented does not. Especially if the solution seems to be installing something both would need....


Then the thing gets even more weird, i did also install the vcredist 2013 on the old laptop and something similar happens, just vice versa. My complex project is working but the small test project with only load methods does not. Maybe there is something else missing on my old laptop, because it did not get any updates from windows in the last few years (like really old). But it is still win7 and 64Bit.


The problem is not that urgent anymore hence installing the vcredist 2013 did solve the issue for the important machines, however i would like to understand how it can be that the same library can have two different behaviors (working and not working) because of the missing redistributables , even with the same dependencies being used.

Regards,

Markus


Von: Hdf-forum <[hidden email]> im Auftrag von markus croé <[hidden email]>
Gesendet: Montag, 15. Januar 2018 14:35:12
An: [hidden email]
Betreff: [Hdf-forum] HDF5.dll not found, HDF.PInvoke, c#
 

Hi guys,

i am stuck with a weird problem. I was able to get closer to a solution, but was in the end even more confused.

The situation and problem are as follows:

I have visual studio 2015 and wanted to use hdf5 to read newer files from matlab, so i took the HDF.PInvoke from NuGet which has version 1.10.1.

Everything worked fine, after a while of understanding how it loads the data and stuff, but there is one pc here in our office which has problems with it. I get the exception that the HDF5.dll is not being found. even though it is situated in the bin64 folder inside of the programs directory, along with the rest of its dependencies. I don't know whats going on there, but it even gets more interesting. As i tried to have a look on if it looks at the right place, it turned out it is, however it gives the message of not finding the file. Then i said ok, lets start with a basic program that only has the load method in it . If it does have problems with the library, even this should fail, right? Nope, this did work, even if i put the program in the same folder as the program that i want to work properly und use the same dependencies as my program. Ergo the binaries should be fine. And since the little load testing program worked with the same binaries on the pc that does not want to run my programs loading method, which is basically the same , i am quite clueless.

Now to the line where it crashes. The loading gets this exception in the line where i call    h5.open()    , and this even if i call it at the start of my program. On my pc everything is fine though and if i run the test program on the other laptop it will run as well.

I thought maybe there could be dlls conflicting, because the free library CsMatIO which reads older versions of matlabs mat-files does also use the zlib.dll, but it is also working if i include csmatio in the test program.

I also tested it with different pcs and there is pcs of win10 and win7 where it works. All pcs are 64bit systems.

The not working one is a win7, 64bit system.


Any help is appreciated.

Regards,

Markus


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5