STEPS TO REPRODUCE 1. Try making a route 2. After adding a second point it segfaults. OBSERVED RESULT (gdb) bt #0 0x00007f391b16790d in std::__atomic_base<int>::operator++ (this=0x24) at /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/bits/atomic_base.h:295 #1 QAtomicOps<int>::ref<int> (_q_value=...) at /usr/include/qt5/QtCore/qatomic_cxx11.h:265 #2 QBasicAtomicInteger<int>::ref (this=0x24) at /usr/include/qt5/QtCore/qbasicatomic.h:114 #3 qAtomicAssign<Marble::GeoDataCoordinatesPrivate> (x=0x0, d=@0x5630355deba8: 0x563035254ee0) at /usr/include/qt5/QtCore/qatomic.h:241 #4 Marble::GeoDataCoordinates::operator= (this=this@entry=0x5630355deba0, other=...) at /var/tmp/portage/kde-apps/marble-19.08.0-r1/work/marble-19.08.0/src/lib/marble/geodata/data/GeoDataCoordinates.cpp:911 #5 0x00007f391b3d3c34 in Marble::RouteSegment::distanceTo (this=0x56303951c6d8, point=..., closest=..., interpolated=...) at /var/tmp/portage/kde-apps/marble-19.08.0-r1/work/marble-19.08.0/src/lib/marble/routing/RouteSegment.cpp:146 #6 0x00007f391b3cdc59 in Marble::Route::updatePosition (this=0x5630355deaf0) at /usr/include/qt5/QtCore/qarraydata.h:211 #7 0x00007f391b3cde75 in Marble::Route::currentSegment (this=0x5630355deaf0) at /var/tmp/portage/kde-apps/marble-19.08.0-r1/work/marble-19.08.0/src/lib/marble/routing/Route.cpp:136 #8 0x00007f391b3e1e0f in Marble::RoutingLayerPrivate::renderRoute (this=0x5630356a3a30, painter=painter@entry=0x7fffda1ace70) at /var/tmp/portage/kde-apps/marble-19.08.0-r1/work/marble-19.08.0/src/lib/marble/routing/RoutingLayer.cpp:359 #9 0x00007f391b3de025 in Marble::RoutingLayer::render (this=0x563035a96900, painter=0x7fffda1ace70, viewport=<optimized out>, renderPos=..., layer=<optimized out>) at /var/tmp/portage/kde-apps/marble-19.08.0-r1/work/marble-19.08.0/src/lib/marble/routing/RoutingLayer.cpp:689 #10 0x00007f391b326a93 in Marble::LayerManager::renderLayers (this=0x56303563f840, painter=painter@entry=0x7fffda1ace70, viewport=0x56303563f820) at /var/tmp/portage/kde-apps/marble-19.08.0-r1/work/marble-19.08.0/src/lib/marble/LayerManager.cpp:181 #11 0x00007f391b2851e7 in Marble::MarbleMap::paint (this=0x5630355d5d30, painter=..., dirtyRect=...) at /var/tmp/portage/kde-apps/marble-19.08.0-r1/work/marble-19.08.0/src/lib/marble/MarbleMap.cpp:862 #12 0x00007f391b279954 in Marble::MarbleWidget::paintEvent (this=0x563035460d60, evt=0x7fffda1ad1c0) at /usr/include/qt5/QtGui/qevent.h:414 #13 0x00007f391a911ae8 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #14 0x00007f391a8d2431 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #15 0x00007f391a8d9810 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #16 0x00007f3919edbc81 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5 #17 0x00007f391a90a755 in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /usr/lib64/libQt5Widgets.so.5 #18 0x00007f391a90b017 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib64/libQt5Widgets.so.5 #19 0x00007f391a8e21b5 in QWidgetBackingStore::doSync() () from /usr/lib64/libQt5Widgets.so.5 #20 0x00007f391a8e2589 in QWidgetBackingStore::sync() () from /usr/lib64/libQt5Widgets.so.5 #21 0x00007f391a8f9ef5 in QWidgetPrivate::syncBackingStore() () from /usr/lib64/libQt5Widgets.so.5 #22 0x00007f391a911c18 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #23 0x00007f391aa1a414 in QMainWindow::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #24 0x00007f391a8d2431 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #25 0x00007f391a8d9810 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5 #26 0x00007f3919edbc81 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5 #27 0x00007f3919ededa6 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQt5Core.so.5 #28 0x00007f3919f2cec3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5 #29 0x00007f39189ce5ad in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0 #30 0x00007f39189ce848 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0 #31 0x00007f39189ce8dc in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0 #32 0x00007f3919f2cc63 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5 #33 0x00007f3919edab83 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5 #34 0x00007f3919ee2892 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5 #35 0x00005630332a5abf in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-apps/marble-19.08.0-r1/work/marble-19.08.0/src/apps/marble-qt/qtmain.cpp:308 SOFTWARE/OS VERSIONS marble 19.08 Linux/KDE Plasma: Gentoo Linux Qt Version: 5.12.4
in fact the assertion is being triggered: qreal RouteSegment::distanceTo( const GeoDataCoordinates &point, GeoDataCoordinates &closest, GeoDataCoordinates &interpolated ) const { Q_ASSERT( !m_path.isEmpty() );