jose7045

ArcGIS 10.1 crashes when an addin invokes GDAL DLL through SWIG C# wrapper

Discussion created by jose7045 on Nov 7, 2012
I am developing an addin with a button that tries to do coordinate transformation using GDAL OSR. When I create a new CoordinateTransformation object ArcMap crashes and close. If I debug the addin against a debug osr_csharp.dll I can see that CoordinateTransformation object is throwing an exception with this message: Unable to load PROJ.4 library (proj.dll), creation of\nOGRCoordinateTransformation failed. I have checked the addin file unziping it and I can see it contains the proj.dll and all the dependencies that osr_csharp.dll should have.

The rare thing is that the same code executed inside an EXE project works without problem.

I suspect that the problem could be some interference between the GDAL 1.8 that ships with ArcGIS 10.1, but I cannot see how. I am not using  gdal18.dll directly, but osr_csharp and its dependencies (proj.dll).

Any ideas on this type of fail?

Thanks in advance

Outcomes