[Qgis-developer] Access violation - no RTTI data

Tom Chadwin tom.chadwin at nnpa.org.uk
Sat Oct 15 04:45:17 PDT 2016


OK, I didn't have the code which causes it quite right:

if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): 
    symbol = layer.rendererV2().categories()[0].symbol() 
    print symbol.symbolLayerCount()

Outputs 1

However:

if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): 
    symbol = layer.rendererV2().categories()[0].symbol() 
    print symbol.symbolLayers()

and:

if isinstance(layer.rendererV2(), QgsCategorizedSymbolRendererV2): 
    symbol = layer.rendererV2().categories()[0].symbol() 
    print symbol.symbolLayer(0)

both cause the RTTI error and QGIS to hang.




-----
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon 
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Access-violation-no-RTTI-data-tp5290830p5290834.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list