Bug report #11848

Memory errors in QgsComposerLabel

Added by Sandro Santilli almost 5 years ago. Updated almost 5 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:20063

Description

Running qgs_atlascompositiontest under valgrind shows (among qt-internal issues) a memory error which seems to be ours:

8089 Conditional jump or move depends on uninitialised value(s)
8089 at 0x59319B6: QgsDistanceArea::computeAreaInit() (qgsdistancearea.cpp:810)
8089 by 0x592CC08: QgsDistanceArea::_copy(QgsDistanceArea const&) (qgsdistancearea.cpp:84)
8089 by 0x592CABD: QgsDistanceArea::QgsDistanceArea(QgsDistanceArea const&) (qgsdistancearea.cpp:54)
8089 by 0x594D391: QgsExpression::setGeomCalculator(QgsDistanceArea const&) (qgsexpression.cpp:1944)
8089 by 0x594DA7E: QgsExpression::replaceExpressionText(QString const&, QgsFeature const*, QgsVectorLayer*, QMap<QString, QVariant> const*, QgsDistanceArea const*) (qgsexpression.cpp:2042)
8089 by 0x5B05BEB: QgsComposerLabel::displayText() const (qgscomposerlabel.cpp:282)
8089 by 0x5B06082: QgsComposerLabel::adjustSizeToText() (qgscomposerlabel.cpp:336)
8089 by 0x40D6DD: TestQgsAtlasComposition::autoscale_render() (testqgsatlascomposition.cpp:220)
8089 by 0x40FBF6: TestQgsAtlasComposition::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (testqgsatlascomposition.moc:75)
8089 by 0x4FBC907: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
8089 by 0x4FBEDC1: QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
8089 by 0x5327FBE: ??? (in /usr/lib/x86_64-linux-gnu/libQtTest.so.4.8.6)

I hadn't tested in the 2.6 branch.

For background see http://lists.osgeo.org/pipermail/qgis-developer/2014-December/035986.html (and thanks Even for the suggestion)

Associated revisions

Revision e5684936
Added by Nyall Dawson almost 5 years ago

Fix use of uninitialized values when no ellipsoid set (fix #11848)

History

#1 Updated by Sandro Santilli almost 5 years ago

The memory error is still there as of commit cee539aae8d0ee3e11edb06f845c84f75566ad96 :

src/core/qgscoordinatereferencesystem.cpp: 329: (loadFromDb) [9ms] failed : /resources/srs.db does not exist!
src/core/qgsscalecalculator.cpp: 42: (setMapUnits) [45ms] Map units set to 2
656 Conditional jump or move depends on uninitialised value(s)
656 at 0x5931956: QgsDistanceArea::computeAreaInit() (qgsdistancearea.cpp:810)
656 by 0x592CBA8: QgsDistanceArea::_copy(QgsDistanceArea const&) (qgsdistancearea.cpp:84)
656 by 0x592CA5D: QgsDistanceArea::QgsDistanceArea(QgsDistanceArea const&) (qgsdistancearea.cpp:54)
656 by 0x594D331: QgsExpression::setGeomCalculator(QgsDistanceArea const&) (qgsexpression.cpp:1944)
656 by 0x594DA1E: QgsExpression::replaceExpressionText(QString const&, QgsFeature const*, QgsVectorLayer*, QMap<QString, QVariant> const*, QgsDistanceArea const*) (qgsexpression.cpp:2042)
656 by 0x5B04F15: QgsComposerLabel::displayText() const (qgscomposerlabel.cpp:282)
656 by 0x5B053AC: QgsComposerLabel::adjustSizeToText() (qgscomposerlabel.cpp:336)
656 by 0x40D6DD: TestQgsAtlasComposition::autoscale_render() (testqgsatlascomposition.cpp:220)
656 by 0x40FBF6: TestQgsAtlasComposition::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (testqgsatlascomposition.moc:75)
656 by 0x4FBC907: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
656 by 0x4FBEDC1: QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
656 by 0x5327FBE: ??? (in /usr/lib/x86_64-linux-gnu/libQtTest.so.4.8.6)

#2 Updated by Nyall Dawson almost 5 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF