[Qgis-developer] QGis Dufour crashes when using QgsMarkerLineSymbolLayerV2.setSubSymbol()

Matthias Kuhn matthias.kuhn at gmx.ch
Fri Jan 24 01:19:24 PST 2014


Hi Alain,

Please do file a report.

Before you do: Can you try to keep reference to the symbol you are 
adding ( self.mySymbol = createSymbol() | 
xxx.setSubSymbol(self.mySymbol) ) and see if that "fixes" your problem. 
Please file a bug even if it does "fix" it so we can still consider 
passing ownership to C++ in that bugreport.

Best
Matthias

On Thu 23 Jan 2014 07:15:17 PM CET, alain wrote:
> Hello,
>
> QgsSVGFillSymbolLayer.setSubSymbol() (to put the outline symbol of a
> polygon) also makes crash QGis.
>
> I tested this with linux and windows 7.
>
> I've found a workaround with QgsMarkerLineSymbolLayer.createFromSld().
> This does work from within a python plugin.
>
> QgsMarkerLineSymbolLayer.createFromSld() call setSubSymbol method from
> the C++ part. So maybe the problem comes from the python bindings, but
> I don't know sip.
>
> Shall I report this as a bug?
>
> Alain
>
>
> Le 20/01/2014 22:31, alain a écrit :
>> Hello,
>>
>> I'm working on a python plugin to render S57 nautical charts using
>> the ogr provider and QGis symbology. For now, I'm just testing how to
>> use Symbology, as I'm not familiar with it, so I think I do something
>> wrong, but can't find examples on Google.
>>
>> I need to compose symbols for lines, using Svg files. This seems to
>> be done using one or more QgsSvgMarkerSymbolLayerV2 in a
>> QgsMarkerSymbol wrapped in a QgsMarkerLineSymbolLayerV2 using
>> setSubSymbol(...) method. Following this idea, I get QGis crashes.
>>
>> I post some code at
>> http://gis.stackexchange.com/questions/83517/qgis-dufour-crashes-when-using-qgsmarkerlinesymbollayer-from-a-python-plugin
>>
>>
>> When I comment the line calling setSubSymbol(), the layer is rendered
>> correctly with a default symbol.
>>
>> Thanks for help.
>>
>> Alain
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer




More information about the Qgis-developer mailing list