[Qgis-developer] buffer segmentation fault

Carson Farmer carson.farmer at gmail.com
Thu Jan 8 07:31:45 EST 2009

Hello again,

Quick question for the list before I submit a bug...

Is anyone else getting a segmentation fault when attempting to buffer 
features (points, lines, or polygons)? It is possible this is a GEOS 
issue, but I'm not sure...

Here is some sample code to try in the python console if you want to 
confirm the above behaviour (assumes your target layer is the first 
layer in your TOC):

 >>> map_canvas = iface.mapCanvas()
 >>> layer = map_canvas.layer( 0 )
 >>> provider = layer.dataProvider()
 >>> all_attributes = provider.attributeIndexes()
 >>> provider.select( all_attributes )
 >>> feature = QgsFeature()
 >>> provider.nextFeature( feature )
 >>> geometry = feature.geometry()
 >>> buffer = geometry.buffer( 500, 5 ) #replace with some relevant value...

and here QGIS closes unexpectedly, leaving the following in the console:

Python support ENABLED :-)
Loaded : Plugin Installer (package: plugin_installer)
Loaded : fTools (package: fTools)
Segmentation fault



More information about the Qgis-developer mailing list