[Qgis-developer] 2.10 segfaults on startup

a.furieri at lqt.it a.furieri at lqt.it
Fri Jul 3 02:32:47 PDT 2015


On Fri, 3 Jul 2015 10:58:33 +0200, Radim Blazek wrote:
> I thought we can, I thought that the problem is concurrent calling of
> spatialite_init () from multiple threads. I don't know details about
> why it crashes in spatialite_init(), but mutex lock does not help.
> I'll revert the commit.
>

Hi Radim,

please consider this previous post:
http://lists.osgeo.org/pipermail/qgis-developer/2015-May/037824.html

- spatialite_init() is now *deprecated*, because as we sadly discovered
   by direct on the field experience this method was thread unsafe.
   please note: it's not only calling spatialite_init() itself that is a
   thread unsafe operation: it's the library as a whole that becomes
   irremediably thread unsafe and crash prone if initialized this way,
   because it will continue to depend on the obsolete thread unsafe API
   provided by both GEOS and PROJ.4

- there is only one possible remedy allowing to safely use 
libspatialite
   even on multithread applications: carefully removing any call to
   spatialite_init() and duly switching to the new alternative mechanism
   supported by all recent versions of libspatialite and based on:
       spatialite_alloc_connection()
       spatialite_init_ex()
       spatialite_cleanup()
   this change will cause libspatialite to always call the most recent
   GEOS/PROJ.$ thread safe API and will effectively resolve any
   multithreading related issue.

OTH
Sandro


More information about the Qgis-developer mailing list