-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gdal.SetConfigOption exception encountered for x64 #160
Comments
More stack trace info: |
Is for this issue a workaround available? I have the same issue with version 3.6.3 downloaded via nuget. |
I think I'm seeing the same or a closely-related issue with Gdal and Gdal.Native 3.7.1, also downloaded via nuget. The inner exception thrown when calling Gdal.SetConfigOption("GDAL_DATA", gdalData) is Unable to load DLL 'gdal_wrap': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) I've compiled for x64. When I compile for Any CPU, this SetConfigOption succeeds, although it runs into problems later. gdal_wrap.dll does existin the nativePath directory. This code doesn't throw an exception.
returns without a problem. The gdal_wrap.dll appears to be a 64 bit dll: mshirley@costigan MINGW64 /c/git/github/TraverseDesigner/timeliner/bin/x64/Debug/gdal (VIPERAPS-549-update-gdal) I don't know whether gdal_wrap.dll calls another DLL in turn that can't load. The 32-bit version appears to be in the right place also: mshirley@costigan MINGW64 /c/git/github/TraverseDesigner/timeliner/bin/x64/Debug/gdal (VIPERAPS-549-update-gdal) When compiled for Any CPU, it gets through Gdal initialization, and I have an error flagged in my data later that's probably related to the upgrade (something got stricter). |
3.7.2 has the same issue, any workaround or fix available. |
I've been hit by this, precisely as in #160 (comment) in 3.9.1. Strangely enough, I'm using 3.9.1 in another project with the same files in the gdal subdirectory and *_csharp.dll's in the application directory, and it seems to be working there. Both projects reference GDAL 3.9.1 and GDAL.Native 3.9.1 via NuGet. I have a hunch it's somehow about auxiliary files that get involved here. I used Dependency Walker on gdal_wrap along with the disassembled .NET code and this entry point was found in gdal_wrap.dll so I'm 99% sure it's talking of some other entry point / version conflict.
|
Hi,
I downloaded gdal 2.4.4 and gdal.native 2.4.4 through nuget.org in a C# project and I am encountering exceptions in Gdal.SetConfigOption calls in GdalConfiguration.cs. The exceptions only occurs if the nativePath variable is set to x64 , it works fine when set to x86.
I think this has been raised before in this link but the latest version available in nuget is 2.4.4 and I'm still encountering the issue. So i'm not sure if this has been fixed or is there another version that I can grab from nuget? Thanks.
Below is the trace output:
--- End of inner exception stack trace ---
at OSGeo.GDAL.GdalPINVOKE.SetConfigOption(String jarg1, String jarg2)
at OSGeo.GDAL.Gdal.SetConfigOption(String pszKey, String pszValue)
at TestGdal.GdalConfiguration..cctor() in D:\Visual Studio 2015\Projects\CheckGdal\TestGdal\TestGdal\GdalConfiguration.cs:line 96
error: Executing directory: D:\Visual Studio 2015\Projects\CheckGdal\TestGdal\TestGdal\bin\Debug
error: gdal directory: D:\Visual Studio 2015\Projects\CheckGdal\TestGdal\TestGdal\bin\Debug\gdal
error: native directory: D:\Visual Studio 2015\Projects\CheckGdal\TestGdal\TestGdal\bin\Debug\gdal\x64
The text was updated successfully, but these errors were encountered: