[QGIS-trac] [Quantum GIS] #3255: Access composer items in Python causes segfault

Quantum GIS qgis at qgis.org
Thu Nov 25 05:42:44 EST 2010


#3255: Access composer items in Python causes segfault
---------------------------------------------------------+------------------
   Reporter:  NathanW                                    |              Owner:  borysiasty   
       Type:  bug                                        |             Status:  new          
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.7.0
  Component:  Python plugins and bindings                |            Version:  Trunk        
   Keywords:  composer                                   |   Platform_version:               
   Platform:  All                                        |           Must_fix:  Yes          
Status_info:  0                                          |  
---------------------------------------------------------+------------------
 If you try and access composer items that were created using the tools in
 the composer window, eg new label, scale etc QGIS crashes with a seg
 fault.

 '''To reproduce:'''

 Open composer and create label, select label, open python window and type:

 {{{
 comp = qgis.utils.iface.activeComposers()[0}.composition()
 label = comp.selectedComposerItems()[0]
 label.displayText() // or any other method
 }}}

 If the label is created using python then the above works as expected,
 otherwise QGIS gives a segfault.

 This happens if you try and access any type of composer item in python
 using the above method.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/3255>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list