Opened 8 years ago

Closed 8 years ago

#5216 closed defect (invalid)

Updating feature fails with FileGDB driver

Reported by: jpalmer Owned by: Even Rouault
Priority: normal Milestone: 1.10.1
Component: default Version: unspecified
Severity: normal Keywords: FileGDB

Description (last modified by jpalmer)

I'm testing GDAL/OGR 1.10.1 RC1 and it seems FileGDB feature updating is broken after r26310.


filegdb_ds = ogr.Open('test.gdb', True)
layer = filegdb_ds.GetLayerByName('test')

f = layer.GetNextFeature()

Returns "Failed updating row (Cannot acquire a lock.)"

I also tested using SetAttributeFilter?() then SetFeature?() and I got the same result.

Attachments (1) (385 bytes) - added by jpalmer 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by jpalmer

Description: modified (diff)

comment:2 Changed 8 years ago by Even Rouault


I've tried to reproduce your issue, and I don't get any error. I also changed the value of a field before calling SetFeature?() and the update was well taken into account.

What is your OS (Linux/Windows?, 32/64 bit) ? Perhaps you could also attach the database ?

Are you also sure that r26310 is the commit that causes your issue ? Reviewing it, I'm quite confident that it should have no impact on the scenario you've tested.

comment:3 Changed 8 years ago by jpalmer

Thanks. I'll get a test case together. I'm running Ubuntu 12.04 64bit fully patched and FileSDK 1.3.

I haven't tested the script before r26310.

Changed 8 years ago by jpalmer

Attachment: added

comment:4 Changed 8 years ago by jpalmer

Test script attached. gdb can be downloaded here

Traceback was:

Traceback (most recent call last):

File "/home/jpalmer/tmp/filegdb_test/", line 15, in <module>


File "/usr/local/lib/python2.7/dist-packages/GDAL-1.10.1-py2.7-linux-x86_64.egg/osgeo/", line 1216, in SetFeature?

return _ogr.Layer_SetFeature(self, *args)

RuntimeError?: Error: Failed updating row (Cannot acquire a lock.)

comment:5 Changed 8 years ago by Even Rouault

Hum, I still don't reproduce with your script and data. The apparent difference is that I still use the old Ubuntu 10.04. I'll try to reproduce in a 12.04 VM. Perhaps could you test commenting gdal.SetConfigOption?('FGDB_BULK_LOAD', 'YES') to see if it makes a difference ? Another idea to test is to remove all the *.lock files in the geodetic_marks.gdb directory, in case of a dangling one causing issue.

comment:6 Changed 8 years ago by Even Rouault

I've just tried in a Ubuntu 12.04 64 bit VM up-to-date, with FileGDB API 1.3, and still no issue.

comment:7 Changed 8 years ago by jpalmer

Resolution: invalid
Status: newclosed

Hi Even,

Really sorry about this but you are right. I've finally tracked the problem down. I needed to reboot the server. Not sure why this helped, but I guess some other file handle was still open to the database.

Warm regards Jeremy

Note: See TracTickets for help on using tickets.