Opened 14 years ago
Closed 14 years ago
#3591 closed defect (invalid)
Python binding - calling Destroy() causes segmentation fault
Reported by: | tylere | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | 1.7.1 |
Severity: | normal | Keywords: | python |
Cc: |
Description
Calling Destroy() after ReleaseResultSet() causes a segmentation fault. See attached file for a script that demonstrates this issue.
Attachments (1)
Change History (2)
by , 14 years ago
Attachment: | test_ogr_releaseresultset.py added |
---|
comment:1 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
remove the ds.ReleaseResultSet(lyr) line. ReleaseResultSet() should only be called on layer returned by ds.ExecuteSQL(). Layers returned by ds.GetLayer() / GetLayerByIndex() / GetLayerByName() do not need to be freed (they are automatically freed by ds.Destroy()). See http://gdal.org/ogr/classOGRDataSource.html#7d3ee7601f510a87afc76de8a51aa9b1
Note:
See TracTickets
for help on using tickets.
script that demostrates the issue