[QGIS-Developer] Seeking info re the PyQt5 QVariant NULL issue

Nyall Dawson nyall.dawson at gmail.com
Thu Feb 1 22:26:45 PST 2018


Hi all,

I'm trying to track down specific information on what the NULL
QVariant issue is and what the intention is behind the code at
https://github.com/qgis/QGIS/blob/master/python/core/conversions.sip#L2237

I believe this code may be the source of some large memory leaks I'm
seeing with the Python bindings - unfortunately my fix for the memory
leaks (https://github.com/qgis/QGIS/pull/6221) results in random,
unpredictable crashes with the Python bindings (seen so far with
methods which return QgsPoint and QgsGeometry objects).

My suspicion is that this NULL handling code may be causing issues
with classes which are QVariant user types, and I'm wondering if it's
safe to exclude user types in this code block. Without knowing what
the issue the code is trying to avoid I'm reluctant to make any
changes to the logic here.

Can anyone give some insights here? Was that block of conversion code
taken from another project or is it unique to QGIS?

Nyall


More information about the QGIS-Developer mailing list