Bug report #13973
Crash when switching from custom renderer to another
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||all||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Crashes QGIS or corrupts data:||Yes|
Subject says it all. To reproduce:
- add custom renderer for vector layer (e.g. one from VectorFieldRenderer plugin or from attached example plugin)
- load point layer and select custom renderer for it from layer properties dialog
- apply changes and close layer properties dialog
- open layer properties dialog again and try to select standard renderer, e.g. Single Symbol
- QGIS crashes
#1 Updated by Alexander Bruy about 2 years ago
- File renderertest.tar.bz2 added
Ok, I solved issue with crash when switching from custom renderer to standard. But there stll get Python error when switching
TypeError: invalid result type from MyTestRendererWidget.renderer()
I checked, MyTestRendererWidget.renderer() returns subclass of the QgsFeatureRendererV2, as required by API.
Test plugin updated
#4 Updated by Martin Dobias almost 2 years ago
- Resolution set to invalid
- Status changed from Open to Closed
The main problem was that the old renderer was used as-is in the test renderer implementation, while it is just a temporary pointer. See the fixed implementation I have attached in #14025 (mytestrenderer.py).
Improved the documentation and closing as invalid...