Hi, When I check Marble GitHub, but don't find guidance which branch to do pull request, therefore I submit bugfix patch here. In PlacemarkLayout, when remove a placemark, m_paintOrder item is not removed when m_visiblePlacemarks remove item. In extreme case ( i.e. updateFeature() during plugin render() ), the m_paintOrder refer to deleted Placemark then segmentation fault. Patch is as attached.
diff --git a/src/lib/marble/PlacemarkLayout.cpp b/src/lib/marble/PlacemarkLayout.cpp index a66a1f46c..3c684b662 100644 --- a/src/lib/marble/PlacemarkLayout.cpp +++ b/src/lib/marble/PlacemarkLayout.cpp @@ -271,6 +271,7 @@ void PlacemarkLayout::removePlacemarks( const QModelIndex& parent, int first, in int zoomLevel = placemark->zoomLevel(); TileId key = TileId::fromCoordinates( coordinates, zoomLevel ); + m_paintOrder.erase(std::remove(m_paintOrder.begin(), m_paintOrder.end(), m_visiblePlacemarks[placemark]), m_paintOrder.end()); delete m_visiblePlacemarks[placemark]; m_visiblePlacemarks.remove(placemark); m_placemarkCache[key].removeAll( placemark ); WANG Cui
bugfix.patch
Description: bugfix.patch