[gdal-dev] SWIG Version

Jason Roberts jason.roberts at duke.edu
Mon Dec 7 09:48:03 EST 2009

FWIW, the Python bindings generated by the old version of SWIG you were
using has a compatibility problem with ArcGIS 9.3.x; the problem is fixed by
1.3.9 (possibly one of the builds in between, but I don't know which).

A new feature of ArcGIS 9.3.x is to allow Python-based geoprocessing tools
to run in the ArcGIS process itself. Previously, ArcGIS created a python.exe
process to run them; now, it creates a Python sub-interpreter in its own
process (ArcMap.exe or ArcCatalog.exe). The Python extension modules
generated by the old version of SWIG had some Python type comparison code
that did not work properly in this scenario. It worked fine for the first
sub-interpreter that ArcGIS instantiated. But in the second and subsequent
ones, the type comparison code failed; it tried to compare types of
PyObjects allocated in the new sub-interpreter to types allocated in the old
one. These types were maintained as C module statics, or something like
that. As a result, many OGR functions would fail in the second and
subsequent sub-interpreters, making OGR unfit for use in Python-based ArcGIS
geoprocessing tools.

Sorry for the long story there. In sum, as a user who wants to use GDAL and
OGR from Python code invoked by ArcGIS, I am very happy you are moving to
SWIG 1.3.39.

Best regards,


-----Original Message-----
From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Howard Butler
Sent: Sunday, December 06, 2009 11:43 AM
To: Frank Warmerdam
Cc: gdal-dev
Subject: Re: [gdal-dev] SWIG Version

On Dec 6, 2009, at 10:40 AM, Frank Warmerdam wrote:
> Is SWIG 1.3.39 acceptable for all bindings maintainers?

1.3.39 as our default moving forward would be fine for the Python bindings.
IIRC, 1.3.40 isn't a good release (for some reason, swig releases are like
wine vintages).

gdal-dev mailing list
gdal-dev at lists.osgeo.org

More information about the gdal-dev mailing list