Opened 10 years ago
Closed 5 years ago
#5308 closed defect (wontfix)
Using Csharp - Intermittent - OSGeo.GDAL.GdalPINVOKE' exception on first call.
Reported by: | charliecolester | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Using GDAL>>> gdal-110-1600-core.msi Same type of problem on a Windows 7 32 bit and 64 bit machine. The problem occurs at the first call to any gdal routine after the paths and environment variables are set. In this case:
Environment.SetEnvironmentVariable("PROJ_LIB", projlib); MessageBox.Show("Final PROJ_LIB= " + projlib);
Here >> OSGeo.GDAL.Gdal.SetConfigOption("PROJ_LIB", projlib);
This is the error message - "An unhandled exception of type 'System.TypeInitializationException' occurred in gdal_csharp.dll Additional information: The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception.
This code works sometime on some machines and fails other times. Right now it will work regardless of where the “csharp” dll’s are, but will only work when the GDAL path and Environmental variables are in: C:\Program Files (x86)\GDAL and not in: C:\Users\Charlie\Desktop\RasterTest2\Libraries\GDAL
Attachments (1)
Change History (2)
by , 10 years ago
Attachment: | Csharp.pdf added |
---|
comment:1 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
Code and directory structure