Hi all, I've written some C code (in one of Fiona's extension modules) that
1. sets a OGRSpatialReferenceH using OSRSetFromUserInput() 2. passes this OGRSpatialReferenceH to GDALDatasetCreateLayer() 3. frees the OGRSpatialReferenceH using OSRDestroySpatialReference() 4. adds feature definitions and features to the layer 4. calls GDALClose() on the layer's dataset When using the Shapefile driver, this code always works. When using the GPKG driver on Mac OS X and Windows (reports at https://github.com/Toblerity/Fiona/issues/441) sporadic crashes occur in OGRSpatialReference::Release() as the dataset is closed and the table, feature definition, and geometry field definition is torn down. Does a created layer take ownership of the OGRSpatialReferenceH? What's the difference in the implementation of Shapefile and GPKG layers? Thanks in advance! -- Sean Gillies
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev