Opened 13 years ago

Closed 13 years ago

#3343 closed bug (fixed)

segfault loading more wms layers into a raster layer

Reported by: brushtyler Owned by: nobody
Priority: critical: causes crash or data corruption Milestone: Version 1.7.0
Component: Rasters Version: Trunk
Keywords: wms, raster, segfault Cc:
Must Fix for Release: No Platform: Linux
Platform Version: Awaiting user input: no

Description

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.

Attachments (1)

core-dumped.txt (13.2 KB ) - added by brushtyler 13 years ago.
core-dumped

Download all attachments as: .zip

Change History (4)

by brushtyler, 13 years ago

Attachment: core-dumped.txt added

core-dumped

comment:1 by jef, 13 years ago

um, no crash, but currently Service denied due to system overload. Please try again later.

in reply to:  1 comment:2 by brushtyler, 13 years ago

Replying to jef:

um, no crash, but currently Service denied due to system overload. Please try again later.

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

comment:3 by jef, 13 years ago

Resolution: fixed
Status: newclosed

fixed in r14929. You need to specify a style for each layer.

Note: See TracTickets for help on using tickets.