Quoting the forum thread: "When drawing a polyline with a label at the end, out of bounds occurs in function ClipPainterPrivate::labelPosition (file ClipPainter.cpp)." Proposed fix: void ClipPainterPrivate::labelPosition( const QPolygonF & polygon, QVector<QPointF>& labelNodes, LabelPositionFlags labelPositionFlags) { int labelPosition = 0; <...> if ( polygon.size() > 1 && labelPositionFlags.testFlag( LineEnd ) ) { if ( pointAllowsLabel( polygon.at( polygon.size() - 1 ) ) ) { labelNodes << polygon.at( polygon.size() - 1 ); } ///# Error occurs at first iteration ///- // The Label at the start of the polyline: ///- for ( int it = polygon.size() - 1; it > 1; --it ) { ///# Instead use this: // The Label at the end of the polyline: for ( int it = polygon.size() - 2; it > 0; --it ) { ///# End of fix. currentAllowsLabel = pointAllowsLabel( polygon.at( it ) ); if ( currentAllowsLabel ) { QPointF node = interpolateLabelPoint( polygon.at( it + 1 ), polygon.at( it ), labelPositionFlags ); if ( node != QPointF( -1.0, -1.0 ) ) { labelNodes << node; } break; } } } }
Fixed with http://commits.kde.org/marble/c07305063dbd73d4bb524c6a2eae61a994c49977