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)

test_ogr_releaseresultset.py (163 bytes ) - added by tylere 14 years ago.
script that demostrates the issue

Download all attachments as: .zip

Change History (2)

by tylere, 14 years ago

script that demostrates the issue

comment:1 by Even Rouault, 14 years ago

Resolution: invalid
Status: newclosed

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.