Bug report #8646
Python QgsRendererV2Widget not displaying on Windows 64 build
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Python plugins | ||
Affected QGIS version: | 2.4.0 | Regression?: | No |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | end of life |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 17377 |
Description
I maintain the VectorFieldRenderer widget, which implements a python custom renderer. The QGIS 2.0 version is working on Ubuntu, but on windows 64 (using standalone installer), when the renderer is selected in the Properties | Style dialog, the renderer configuration widget is not displayed, and instead there is just a message "This renderer doesn't implement a graphical interface".
I've build a minimal custom renderer (attached as LayerTest.zip), and that behaves in the same way, so I suspect that there is an issue in 64bit build (note - I haven't tested other windows builds).
Steps to replicate:
1) Install attached LayerTest plugin to <user home>/.qgis2/python/plugins
2) Start QGIS
3) Open plugin manager and enable LayerTest plugin
4) Create a new point vector layer
5) Make the new layer the current layer and open the Style tab of the layer Properties dialog
6) Select the LayerTest renderer type
The dialog box should show "Dummy widget for layer <layer name>".
It does this on ubuntu 12.04. On windows 64bit build it displays the error message above (This renderer doesn't implement a graphical interface).
Associated revisions
Force compilers to generate vtable for QgsRendererV2Metadata
Fix #8646
Fix #5170
Explanation see: http://trac.osgeo.org/geos/ticket/535#comment:11
History
#1 Updated by Anonymous about 11 years ago
- Status changed from Open to Closed
Fixed in changeset 86ddc49acf3599e6d959f462da1d870dd6ba148d.
#2 Updated by Matthias Kuhn about 11 years ago
Hi, can somebody verify, if this really solves the issue and re-open if appropriate?
And thanks to @mbernasocchi for finding this solution.
#3 Updated by Chris Crook about 11 years ago
Subtle indeed - great work. ATM I don't have a windows build environment, so can't confirm. But, in anticipation of this resolving the issue, thanks!
#4 Updated by Andy Aschwanden almost 11 years ago
- Status changed from Closed to Reopened
Hi,
While I was trying to use the VectorFieldRenderer widget mentioned above, I've noticed that this issue still exists on QGIS 7c98970 (nightly build from http://qgis.dakotacarto.com/, Mac OS X 10.8.5). I've also tested the minimal example in TestLayer.zip, with the same result, it shows
"This renderer doesn't implement a graphical interface"
Thanks.
#5 Updated by Paolo Cavallini almost 11 years ago
- Target version changed from Version 2.0.0 to Future Release - High Priority
#6 Updated by Chris Crook over 10 years ago
Still seems to be an issue in version 2.4 on Windows 64bit
#7 Updated by Chris Crook over 10 years ago
- Affected QGIS version changed from 2.0.1 to 2.4.0
#8 Updated by Chris Crook about 10 years ago
- Operating System changed from Windows to All
- Priority changed from Normal to High
I've just upgraded Ubuntu to version 14.04 and this issue is now present on Ubuntu as well. So it occurs in 64 bit environments generally - windows, ubuntu, mac. This occurs both in the released version and building from source. I assume that this is due to a new version of SIP with the Ubuntu version upgrade.
#9 Updated by Chris Crook about 10 years ago
The underlying issue relates to python subclasses of C++ classes. When the python object is saved in C++ code (eg in a registry), it loses the python bindings to methods that are over-ridden in the python class- they are not used when the object is called from C++, and instead the C++ base class implementations of the methods are used.
This means that python implementations of C++ base classes (renderers, custom layers, etc) will generally not work.
#10 Updated by Chris Crook about 10 years ago
- OS version changed from 7 (64 bit) to 64 bit
#11 Updated by Jürgen Fischer about 10 years ago
Despite the /Transfer/
annotation on QgsRendererV2Registry::addRenderer
the LayerMetadata
instance is deleted. If the metadata is assigned to a member variable of Plugin
to avoid it's destruction the GUI page appears.
#12 Updated by Jürgen Fischer about 10 years ago
- Priority changed from High to Normal
#13 Updated by Jürgen Fischer about 10 years ago
- Category changed from Build/Install to Python plugins
#14 Updated by Giovanni Manghi over 7 years ago
- Regression? set to No
- Easy fix? set to No
#15 Updated by Giovanni Manghi over 5 years ago
- Resolution set to end of life
- Status changed from Reopened to Closed
End of life notice: QGIS 2.18 LTR
Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/