Bug report #3343

segfault loading more wms layers into a raster layer

Added by Giuseppe Sucameli over 13 years ago. Updated over 13 years ago.

Assignee:nobody -
Affected QGIS version: Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:13403


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!" 


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.

core-dumped.txt Magnifier - core-dumped (13.2 KB) Giuseppe Sucameli, 2010-12-16 05:52 AM

Associated revisions

Revision e2df4735
Added by Jürgen Fischer over 13 years ago

fix #3343

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14929 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 542f1ecb
Added by Jürgen Fischer over 13 years ago

fix #3343

git-svn-id: http://svn.osgeo.org/qgis/trunk@14929 c8812cc2-4d05-0410-92ff-de0c093fc19c


#2 Updated by Giuseppe Sucameli over 13 years ago

Replying to [comment:1 jef]:

Could you try with a different server WMS? I've just recompiled QGis and it still crashes.

#3 Updated by Jürgen Fischer over 13 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

fixed in 542f1ecb (SVN r14930). You need to specify a style for each layer.

Also available in: Atom PDF