MaxRev-Dev / gdal.netcore

GDAL 3.x C#/F# bindings for .NET apps
MIT License
162 stars 36 forks source link

Exception when referencing core 3.7.0 from 3.8.3.* runtime #120

Closed CGSgeosite closed 10 months ago

CGSgeosite commented 10 months ago

when read ESRI-Shapefile:

System.AccessViolationException HResult=0x80004003 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

MaxRev-Dev commented 10 months ago

Which runtime, which platform, which OS? Can you create a MRE? We have a bug issue template just in case.

MaxRev-Dev commented 10 months ago

First of all, it wasn't published when you tried last time. You have to ensure you use the latest package. Not the 3.7.0.x. The runner didn't complete that time, so you can try again. Then the package you reference doesn't exist. The Core and Runtime were built separately in CI.

Run this line in CLI and rerun your app. dotnet add package MaxRev.Gdal.WindowsRuntime.Minimal

The latest version (a single one) is *.259 https://www.nuget.org/packages/MaxRev.Gdal.WindowsRuntime.Minimal

MaxRev-Dev commented 10 months ago

I assume this one is resolved as CI tests were completed successfully.

CGSgeosite commented 10 months ago

OS: Windows 10 Visual studio 2022 Runtime: MaxRev.Gdal.Core Version="3.8.3.286" MaxRev.Gdal.WindowsRuntime.Minimal Version="3.8.3.259"

MaxRev-Dev commented 10 months ago

So have you tried the latest runtime package? As I already mentioned above - windows runtime was delayed in CI and was published around 12 hours ago. But your issue was created 18 hours ago which means you might reference a wrong runtime package.

And, of course, it would be nice to see any code here to repro this. Otherwise, I won't be able to investigate this and will close the issue.

CGSgeosite commented 10 months ago

The latest package is okay. Thanks