[gdal-dev] Data corruption when using OpenFileGDB writing and SetFeature()

Even Rouault even.rouault at spatialys.com
Thu Mar 30 13:30:23 PDT 2023


Hi,

just to notify that we have had recently a few reports of users using 
the write side of the OpenFileGDB driver, and SetFeature() to update 
existing features.

This proved to cause data corruptions in some situations, sometimes with 
an error message on re-reading or when regenerating the spatial index, 
but not always. The same could also likely happen with DeleteFeature() + 
CreateFeature() scenarios, basically all situations where the driver 
tries to re-use a freed space by using the .freelist file where free 
spaces are recorded.

Creation of a new file or appending to a file whose features have never 
been edited or deleted is OK though. You may also workaround the bug by 
doing one SetFeature() operation at a time, closing the dataset, and 
deleting the .freelist files in the .gdb directory, before re-opening 
and doing the next edition, but that's likely to be unpractical & 
inefficient.

The bug has now been fixed in master and 3.6 branches, but affects 3.6.0 
to 3.6.3 releases. I'll issue a 3.6.4 in ~2 weeks.

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list