HDF.PInvoke icon indicating copy to clipboard operation
HDF.PInvoke copied to clipboard

GetDllPathFromAppConfig Not Considering Existing Keys

Open MrMontana1889 opened this issue 2 years ago • 7 comments

If a program has keys specified in its config file that is NOT "NativeDependenciesAbsolutePath", then a NullReferenceException occurs on line 31 in NativeDependencies.cs where it attempts to get the path.

A null check should be added for the NativePathString key before attempting to get the value.

In the short term, I can clone and make the change locally, but this should be officially fixed and released.

This is a blocking issue for me.

MrMontana1889 avatar Jan 18 '23 23:01 MrMontana1889

Is HDF.PInvoke.1.10 working for you? It uses as different library resolution process.

Apollo3zehn avatar Jan 19 '23 10:01 Apollo3zehn

Unfortunately, I can't use 1.10 right now since we are using 1.8 when writing results. We're hoping to move to 1.10 at some point down the road.

I have the fix locally and I can use that build for the time being, but it would be nice to use an official build of the library rather than building it locally.

MrMontana1889 avatar Jan 19 '23 10:01 MrMontana1889

@gheber, would you accept a PR fixing this and publish a patch release on Nuget?

If yes, @MrMontana1889 , could you please create a PR?

Apollo3zehn avatar Jan 19 '23 13:01 Apollo3zehn

@MrMontana1889. I'm pretty sure version 1.10 saves by default in 1.8 format so using 1.10 should work fine for you. You can override this behaviour using set_libver_bounds.

PhilPJL avatar Jan 19 '23 17:01 PhilPJL

@MrMontana1889. I'm pretty sure version 1.10 saves by default in 1.8 format so using 1.10 should work fine for you. You can override this behaviour using set_libver_bounds.

Yes.

gheber avatar Jan 20 '23 00:01 gheber

@gheber, would you accept a PR fixing this and publish a patch release on Nuget?

If yes, @MrMontana1889 , could you please create a PR?

Yes.

gheber avatar Jan 20 '23 00:01 gheber

I'll give it a shot tomorrow.

MrMontana1889 avatar Jan 20 '23 00:01 MrMontana1889