[Qgis-developer] buffer segmentation fault
Martin Dobias
wonder.sk at gmail.com
Thu Jan 8 07:56:20 EST 2009
On Thu, Jan 8, 2009 at 1:31 PM, Carson Farmer <carson.farmer at gmail.com> wrote:
> 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...
Seems to work fine for me. Please try to build qgis with debug mode
and start it inside GDB. When qgis will crash, gdb command line opens
and you'll be able to inspect where the segfault happened (and
possibly why). Important command is "bt" which prints the backtrace.
Martin
More information about the Qgis-developer
mailing list