Bug report #17517

Crash on raster layer render change from python

Added by Vincent Mora almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:Rasters
Affected QGIS version:master Regression?:Yes
Operating System:Ubuntu 16.10 Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:25414

Description

Following the cookbook exemple, or simply loading a raster layer in qgis, making it active, and issuing in the python console:

iface.activeLayer().setRenderer(QgsSingleBandGrayRenderer(iface.activeLayer().dataProvider(), 1))

causes a segfault.

Associated revisions

Revision 98d2dcbf
Added by Alessandro Pasotti almost 7 years ago

[bugfix] Crash on raster layer render change from python

Fixes #17517

Requires backporting

Revision fa7082b9
Added by Alessandro Pasotti almost 7 years ago

[bugfix] Crash on raster layer render change from python

Backported from master PR https://github.com/qgis/QGIS/pull/5696

Fixes #17517

History

#1 Updated by Alessandro Pasotti almost 7 years ago

  • Assignee set to Alessandro Pasotti

#2 Updated by Alessandro Pasotti almost 7 years ago

also affects master

#3 Updated by Alessandro Pasotti almost 7 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • Easy fix? changed from No to Yes
  • Affected QGIS version changed from 2.18.14 to master

PR: https://github.com/qgis/QGIS/pull/5696
Backport will follow ....

#4 Updated by Anonymous almost 7 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#5 Updated by Giovanni Manghi almost 7 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF