Bug report #3507

built-in spatialindex conflicts with external libspatialindex

Added by rustychris - almost 12 years ago. Updated about 7 years ago.

Category:Python plugins
Affected QGIS version:master Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:13567


libspatialindex is used by the python rtree module, but when this module is loaded from within a QGIS python plugin, the symbols from the builtin copy of spatialindex collide and render the python rtree module inoperable.

How to reproduce: install the rtree python module. Start QGIS and open a python console:

>>> import rtree
>>> p = rtree.index.Property()
>>> p.set_storage(0)
>>> p.get_storage()

Stepping through in gdb shows that libspatialindex.so:Tools::PropertySet::getProperty is shadowed by a function of the same name in libqgis_core.so.


#1 Updated by Volker Fröhlich over 11 years ago

By updating the SpatialIndex wrapper and amending CMakeLists and creating a Cmake script, I managed to build QGIS with a systemwide libspatialindex.

Wonder proposed to update the shipped copy of SpatialIndex and update the wrapper, so the user has the choice to use either lib.

Doing so, would help your problem, I suppose.

I can provide a patch, but I'm not a 100% sure, everything works correct or that my patch is sound, as I am no C++ programmer. Maybe we should do that after 1.7.

#2 Updated by Borys Jurgiel over 11 years ago

The sooner you send it, the sooner JEF&Marco&Tim&Martin will be able to review it ;-)

#3 Updated by Volker Fröhlich over 11 years ago

  • Pull Request or Patch supplied set to No

Please see #4111

#4 Updated by Giovanni Manghi almost 11 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#5 Updated by Paolo Cavallini over 10 years ago

  • Affected QGIS version set to master
  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.7.4 to Version 1.8.0

#6 Updated by Paolo Cavallini over 10 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#7 Updated by Borys Jurgiel about 10 years ago

  • Assignee deleted (Borys Jurgiel)

#8 Updated by Jürgen Fischer over 8 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#9 Updated by Médéric RIBREUX about 7 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed/implemented

Hello, bug triage...

with QGIS 2.13 on Debian, there is no conflict: p.get_storage() returns 0.

I am closing this bug.

Also available in: Atom PDF