Bug report #13973
Crash when switching from custom renderer to another
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Martin Dobias | ||
Category: | Python plugins | ||
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 | Copied to github as #: | 21987 |
Description
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
Related issues
Associated revisions
Improve documentation for renderer registry metadata (refs #13973)
History
#1 Updated by Alexander Bruy almost 9 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
#2 Updated by Alexander Bruy almost 9 years ago
- File deleted (
renderertest.tar.bz2)
#3 Updated by Alexander Bruy almost 9 years ago
- Assignee set to Martin Dobias
#4 Updated by Martin Dobias almost 9 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...