[QGIS-Developer] Crash at application termination on Linux
Even Rouault
even.rouault at spatialys.com
Sat Jun 2 18:13:52 PDT 2018
Eureka! I finally found what's wrong. I had an old version of the
output/lib/qgis/plugins/libqgisgrass7.so.2.99.0 alongside its more .so.3.1.0 variant
and both were loaded. And that same for my 2.18 build with all the 2.18.x micro versions.
Apart from remembering to do a clean to avoid that, a potential fix would be to change
QgsPluginRegistry::restoreSessionPlugins() to use a "*.so" filter instead of the "*.so*" one (consistently
with the filter of gsProviderRegistry::init()). That would work
since there's a libqgisgrass7.so symlink to the most recent libqgisgrass7.so.X.Y.Z file.
OK, so no longer crash at exit. There's still something fishy, but this one looks
like a real bug.
==14354== Invalid read of size 4
==14354== at 0x13C66DE5: pj_ctx_get_errno (pj_ctx.c:137)
==14354== by 0x13C654A9: pj_free (pj_malloc.c:188)
==14354== by 0x88C4B83: QgsCoordinateTransformPrivate::freeProj() (qgscoordinatetransform_p.cpp:336)
==14354== by 0x88C275B: QgsCoordinateTransformPrivate::~QgsCoordinateTransformPrivate() (qgscoordinatetransform_p.cpp:88)
==14354== by 0x88BE81E: QExplicitlySharedDataPointer<QgsCoordinateTransformPrivate>::~QExplicitlySharedDataPointer() (qshareddata.h:156)
==14354== by 0x88B7607: QgsCoordinateTransform::~QgsCoordinateTransform() (qgscoordinatetransform.cpp:139)
==14354== by 0x88C15D7: QHashNode<QPair<QString, QString>, QgsCoordinateTransform>::~QHashNode() (qhash.h:237)
==14354== by 0x88C1656: QHash<QPair<QString, QString>, QgsCoordinateTransform>::deleteNode2(QHashData::Node*) (qhash.h:585)
==14354== by 0xB9CABF8: QHashData::free_helper(void (*)(QHashData::Node*)) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1)
==14354== by 0x88C0026: QHash<QPair<QString, QString>, QgsCoordinateTransform>::freeData(QHashData*) (qhash.h:621)
==14354== by 0x88BF4E5: QHash<QPair<QString, QString>, QgsCoordinateTransform>::~QHash() (qhash.h:342)
==14354== by 0x88C1CDB: QMultiHash<QPair<QString, QString>, QgsCoordinateTransform>::~QMultiHash() (qhash.h:994)
==14354== Address 0x45341830 is 0 bytes inside a block of size 32 free'd
==14354== at 0x4C2ECF0: free (vg_replace_malloc.c:530)
==14354== by 0x13C653FD: pj_dealloc (pj_malloc.c:133)
==14354== by 0x88C1D60: QgsProjContextStore::~QgsProjContextStore() (qgscoordinatetransform_p.cpp:45)
==14354== by 0xBE22DF5: (anonymous namespace)::run(void*) (atexit_thread.cc:71)
==14354== by 0xC376FF7: __run_exit_handlers (exit.c:82)
==14354== by 0xC377044: exit (exit.c:104)
==14354== by 0xC35D836: (below main) (libc-start.c:325)
==14354== Block was alloc'd at
==14354== at 0x4C2DBF6: malloc (vg_replace_malloc.c:299)
==14354== by 0x13C66D8A: pj_ctx_alloc (pj_ctx.c:109)
==14354== by 0x88C1D14: QgsProjContextStore::QgsProjContextStore() (qgscoordinatetransform_p.cpp:40)
==14354== by 0x88C4E0B: __tls_init (qgscoordinatetransform_p.cpp:33)
==14354== by 0x88C4EE1: TLS wrapper function for QgsCoordinateTransformPrivate::mProjContext (in /home/even/qgis/QGIS/build/output/lib/libqgis_core.so.3.1.0)
==14354== by 0x88C37A6: QgsCoordinateTransformPrivate::threadLocalProjData() (qgscoordinatetransform_p.cpp:228)
==14354== by 0x88C316E: QgsCoordinateTransformPrivate::initialize() (qgscoordinatetransform_p.cpp:162)
==14354== by 0x88B7AAA: QgsCoordinateTransform::setDestinationCrs(QgsCoordinateReferenceSystem const&) (qgscoordinatetransform.cpp:165)
==14354== by 0x894296B: QgsDistanceArea::setFromParams(QgsEllipsoidUtils::EllipsoidParameters const&) (qgsdistancearea.cpp:684)
==14354== by 0x893AD33: QgsDistanceArea::setEllipsoid(QString const&) (qgsdistancearea.cpp:80)
==14354== by 0x8D049FE: QgsRenderContext::QgsRenderContext() (qgsrendercontext.cpp:37)
==14354== by 0x844D48C: QgsLayerTreeModel::createTemporaryRenderContext() const (qgslayertreemodel.cpp:1311)
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the QGIS-Developer
mailing list