[QGIS-trac] [Quantum GIS] #3343: segfault loading more wms layers into a raster layer

Quantum GIS qgis at qgis.org
Thu Dec 16 08:49:08 EST 2010


#3343: segfault loading more wms layers into a raster layer
---------------------------------------------------------+------------------
   Reporter:  brushtyler                                 |              Owner:  nobody       
       Type:  bug                                        |             Status:  new          
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.7.0
  Component:  Rasters                                    |            Version:  Trunk        
   Keywords:  wms, raster, segfault                      |   Platform_version:               
   Platform:  Linux                                      |           Must_fix:  No           
Status_info:  0                                          |  
---------------------------------------------------------+------------------
 A segfault occurs using python to load more than one wms layers into one
 raster layer.
 Instead, all works fine using the "Add WMS layer" GUI to do the same, so I
 don't know if it's a python binding issue.

 The following code snippet is the same code present in the PyQGIS doc,
 except that it tries to load more wms layers.

 {{{
 url = 'http://wms.jpl.nasa.gov/wms.cgi'
 layers = [ 'global_mosaic', 'global_mosaic_base' ]
 styles = [ 'pseudo' ]
 format = 'image/jpeg'
 crs = 'EPSG:4326'
 rlayer = QgsRasterLayer(0, url, 'some layer name', 'wms', layers, styles,
 format, crs)
 if not rlayer.isValid():
     print "Layer failed to load!"

 QgsMapLayerRegistry.instance().addMapLayer(rlayer)
 }}}

 Running the last row to add the layer to the canvas I get segfault.
 I'm sure the error occurs when the rendering starts. Indeed disabling the
 renderFlag no segfaults occur until I re-enable it.

 Sometimes I get a core-dumped. See the attachments.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/3343>
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