Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2615 closed defect (fixed)

Crash after "download more" because of virtual nodes

Reported by: dantje Owned by: Koying
Priority: major Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

Linux / Ubuntu 9.10 / QT 4.5.2

  • Compile from SVN
  • Startup
  • Download area
  • Scroll up a little
  • Download more
  • Crash:
Program received signal SIGILL, Illegal instruction.
0x00000000006ef271 in typeinfo for ggl::index::rtree<CoordBox, MapFeature*> ()
(gdb) bt
#0  0x00000000006ef271 in typeinfo for ggl::index::rtree<CoordBox, MapFeature*> ()
#1  0x000000000171ae10 in ?? ()
#2  0x000000000048ed5b in SortAccordingToRenderingPriority::operator() (this=0x7fffffffbd00, A=0x1a6c3c0, B=0x171ae10)
    at ./Utils/SortAccordingToRenderingPriority.h:14
#3  0x0000000000491198 in QAlgorithmsPrivate::qSortHelper<QList<MapFeature*>::iterator, MapFeature*, SortAccordingToRenderingPriority> (
    start=..., end=..., t=@0x182f608, lessThan=...) at /usr/include/qt4/QtCore/qalgorithms.h:397
#4  0x000000000048f319 in qSort<QList<MapFeature*>::iterator, SortAccordingToRenderingPriority> (start=..., end=..., lessThan=...)
    at /usr/include/qt4/QtCore/qalgorithms.h:204
#5  0x00000000005a5bce in MapView::sortRenderingPriority (this=0x7fffe010c660) at MapView.cpp:299
#6  0x00000000005a656b in MapView::buildFeatureSet (this=0x7fffe010c660) at MapView.cpp:368
#7  0x00000000005a4265 in MapView::paintEvent (this=0x7fffe010c660, anEvent=0x7fffffffc930) at MapView.cpp:193
#8  0x00007ffff5ce17a0 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#9  0x00000000005aad79 in MapView::event (this=0x7fffe010c660, event=0x7fffffffc930) at MapView.cpp:1189
#10 0x00007ffff5c92efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#11 0x00007ffff5c9a1ce in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#12 0x00007ffff54e4c2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#13 0x00007ffff5ce8b93 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*)
    () from /usr/lib/libQtGui.so.4
#14 0x00007ffff5e5adbe in ?? () from /usr/lib/libQtGui.so.4
#15 0x00007ffff5cdafa0 in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQtGui.so.4
#16 0x00007ffff5ce15b8 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#17 0x00007ffff60579db in QMainWindow::event(QEvent*) () from /usr/lib/libQtGui.so.4
#18 0x00007ffff5c92efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#19 0x00007ffff5c9a1ce in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#20 0x00007ffff54e4c2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#21 0x00007ffff54e580a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#22 0x00007ffff550d533 in ?? () from /usr/lib/libQtCore.so.4
#23 0x00007ffff2fbebce in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#24 0x00007ffff2fc2598 in ?? () from /lib/libglib-2.0.so.0
#25 0x00007ffff2fc26c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#26 0x00007ffff550d1a6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#27 0x00007ffff5d274be in ?? () from /usr/lib/libQtGui.so.4
#28 0x00007ffff54e3532 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#29 0x00007ffff54e3904 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0x00007ffff54e5ab9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#31 0x0000000000603b14 in main (argc=1, argv=0x7fffffffe358) at Main.cpp:207

Second case

  • Compile from SVN
  • Startup
  • Download area
  • Scroll up a little
  • Another Download area
  • Crash:
Program received signal SIGSEGV, Segmentation fault.
0x000000000048ed4f in SortAccordingToRenderingPriority::operator() (this=0x7fffffffbd00, A=0x196e470, B=0x16c6f30)
    at ./Utils/SortAccordingToRenderingPriority.h:14
14				return A->renderPriority() < B->renderPriority();
(gdb) bt
#0  0x000000000048ed4f in SortAccordingToRenderingPriority::operator() (this=0x7fffffffbd00, A=0x196e470, B=0x16c6f30)
    at ./Utils/SortAccordingToRenderingPriority.h:14
#1  0x0000000000491198 in QAlgorithmsPrivate::qSortHelper<QList<MapFeature*>::iterator, MapFeature*, SortAccordingToRenderingPriority> (
    start=..., end=..., t=@0x1ae90e8, lessThan=...) at /usr/include/qt4/QtCore/qalgorithms.h:397
#2  0x000000000048f319 in qSort<QList<MapFeature*>::iterator, SortAccordingToRenderingPriority> (start=..., end=..., lessThan=...)
    at /usr/include/qt4/QtCore/qalgorithms.h:204
#3  0x00000000005a5bce in MapView::sortRenderingPriority (this=0x15cb270) at MapView.cpp:299
#4  0x00000000005a656b in MapView::buildFeatureSet (this=0x15cb270) at MapView.cpp:368
#5  0x00000000005a4265 in MapView::paintEvent (this=0x15cb270, anEvent=0x7fffffffc930) at MapView.cpp:193
#6  0x00007ffff5ce17a0 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#7  0x00000000005aad79 in MapView::event (this=0x15cb270, event=0x7fffffffc930) at MapView.cpp:1189
#8  0x00007ffff5c92efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#9  0x00007ffff5c9a1ce in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#10 0x00007ffff54e4c2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#11 0x00007ffff5ce8b93 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*)
    () from /usr/lib/libQtGui.so.4
#12 0x00007ffff5e5adbe in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007ffff5cdafa0 in QWidgetPrivate::syncBackingStore() () from /usr/lib/libQtGui.so.4
#14 0x00007ffff5ce15b8 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x00007ffff60579db in QMainWindow::event(QEvent*) () from /usr/lib/libQtGui.so.4
#16 0x00007ffff5c92efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#17 0x00007ffff5c9a1ce in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#18 0x00007ffff54e4c2c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#19 0x00007ffff54e580a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#20 0x00007ffff550d533 in ?? () from /usr/lib/libQtCore.so.4
#21 0x00007ffff2fbebce in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#22 0x00007ffff2fc2598 in ?? () from /lib/libglib-2.0.so.0
#23 0x00007ffff2fc26c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#24 0x00007ffff550d1a6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#25 0x00007ffff5d274be in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007ffff54e3532 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#27 0x00007ffff54e3904 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#28 0x00007ffff54e5ab9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#29 0x0000000000603b14 in main (argc=1, argv=0x7fffffffe358) at Main.cpp:207

Change History (14)

comment:1 Changed 8 years ago by dantje

valgrind says that a Trackpoint was deleted/free'd which is later used. The delete
occured after the decision that we are looking at a coastline. I'm testing this on
the coastline of the northsea.

==7373== Invalid read of size 8
==7373==    at 0x48ED77: SortAccordingToRenderingPriority::operator()(MapFeature*, MapFeature*) (SortAccordingToRenderingPriority.h:14)
==7373==    by 0x491019: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature*>::iterator, MapFeature*, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, MapFeature* const&, SortAccordingToRenderingPriority) (qalgorithms.h:384)
==7373==    by 0x48F318: void qSort<QList<MapFeature*>::iterator, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, SortAccordingToRenderingPriority) (qalgorithms.h:204)
==7373==    by 0x5A5BCD: MapView::sortRenderingPriority() (MapView.cpp:299)
==7373==    by 0x5A656A: MapView::buildFeatureSet() (MapView.cpp:368)
==7373==    by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView.cpp:193)
==7373==    by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x5AAD78: MapView::event(QEvent*) (MapView.cpp:1189)
==7373==    by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7373==    by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==  Address 0x17a442b0 is 0 bytes inside a block of size 96 free'd
==7373==    at 0x4C24A7A: operator delete(void*) (vg_replace_malloc.c:346)
==7373==    by 0x598D63: TrackPoint::~TrackPoint() (TrackPoint.cpp:49)
==7373==    by 0x563EA4: Road::updateVirtuals() (Road.cpp:201)
==7373==    by 0x564917: Road::updateMeta() (Road.cpp:338)
==7373==    by 0x564E61: Road::isCoastline() (Road.cpp:389)
==7373==    by 0x5A6296: MapView::buildFeatureSet() (MapView.cpp:351)
==7373==    by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView.cpp:193)
==7373==    by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x5AAD78: MapView::event(QEvent*) (MapView.cpp:1189)
==7373==    by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7373== 
==7373== Jump to the invalid address stated on the next line
==7373==    at 0x0: ???
==7373==    by 0x491019: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature*>::iterator, MapFeature*, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, MapFeature* const&, SortAccordingToRenderingPriority) (qalgorithms.h:384)
==7373==    by 0x48F318: void qSort<QList<MapFeature*>::iterator, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, SortAccordingToRenderingPriority) (qalgorithms.h:204)
==7373==    by 0x5A5BCD: MapView::sortRenderingPriority() (MapView.cpp:299)
==7373==    by 0x5A656A: MapView::buildFeatureSet() (MapView.cpp:368)
==7373==    by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView.cpp:193)
==7373==    by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x5AAD78: MapView::event(QEvent*) (MapView.cpp:1189)
==7373==    by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7373==    by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==7373== 
==7373== 
==7373== Process terminating with default action of signal 11 (SIGSEGV)
==7373==  Bad permissions for mapped region at address 0x0
==7373==    at 0x0: ???
==7373==    by 0x491019: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature*>::iterator, MapFeature*, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, MapFeature* const&, SortAccordingToRenderingPriority) (qalgorithms.h:384)
==7373==    by 0x48F318: void qSort<QList<MapFeature*>::iterator, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, SortAccordingToRenderingPriority) (qalgorithms.h:204)
==7373==    by 0x5A5BCD: MapView::sortRenderingPriority() (MapView.cpp:299)
==7373==    by 0x5A656A: MapView::buildFeatureSet() (MapView.cpp:368)
==7373==    by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView.cpp:193)
==7373==    by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x5AAD78: MapView::event(QEvent*) (MapView.cpp:1189)
==7373==    by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7373==    by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7373==    by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)

comment:2 Changed 8 years ago by dantje

  • Priority changed from major to critical

comment:3 Changed 8 years ago by Koying

  • Owner changed from cbro@… to Koying
  • Status changed from new to assigned

comment:4 Changed 8 years ago by Koying

  • Priority changed from critical to major

Temporary workaround: Disable Virtual Nodes in Preferences

comment:5 Changed 8 years ago by dantje

This behaviour is triggered when the two downloaded areas overlapped. I probed around the code for a while, but to no avail. I noticed that the SetLayer?() method 'reparents' all nodes, but not the virtualNodes.

comment:6 Changed 8 years ago by dantje

  • Summary changed from Crash after "download more" to Crash after "download more" because of virtual nodes

comment:7 Changed 8 years ago by koying

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [19333]) FIX : do not reindex() virtual nodes (fixes #2615)

comment:8 Changed 8 years ago by dantje

  • Resolution fixed deleted
  • Status changed from closed to reopened

==7725== Invalid read of size 8
==7725== at 0x48ED7A: SortAccordingToRenderingPriority::operator()(MapFeature?*, MapFeature?*) (SortAccordingToRenderingPriority?.h:14)
==7725== by 0x4911CB: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature?*>::iterator, MapFeature?*, SortAccordingToRenderingPriority?>(QList<MapFeature?*>::iterator, QList<MapFeature?*>::iterator, MapFeature?* const&, SortAccordingToRenderingPriority?) (qalgorithms.h:397)
==7725== by 0x48F34C: void qSort<QList<MapFeature?*>::iterator, SortAccordingToRenderingPriority?>(QList<MapFeature?*>::iterator, QList<MapFeature?*>::iterator, SortAccordingToRenderingPriority?) (qalgorithms.h:204)
==7725== by 0x5A5BCD: MapView::sortRenderingPriority() (MapView?.cpp:299)
==7725== by 0x5A656A: MapView::buildFeatureSet() (MapView?.cpp:368)
==7725== by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView?.cpp:193)
==7725== by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x5AAD78: MapView::event(QEvent*) (MapView?.cpp:1189)
==7725== by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7725== by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== Address 0x17312380 is 0 bytes inside a block of size 96 free'd
==7725== at 0x4C24A7A: operator delete(void*) (vg_replace_malloc.c:346)
==7725== by 0x598D63: TrackPoint::~TrackPoint?() (TrackPoint?.cpp:49)
==7725== by 0x483BA1: MapLayer::deleteFeature(MapFeature?*) (MapLayer?.cpp:232)
==7725== by 0x563EA5: Road::updateVirtuals() (Road.cpp:200)
==7725== by 0x564917: Road::updateMeta() (Road.cpp:338)
==7725== by 0x564E61: Road::isCoastline() (Road.cpp:389)
==7725== by 0x5A6296: MapView::buildFeatureSet() (MapView?.cpp:351)
==7725== by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView?.cpp:193)
==7725== by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x5AAD78: MapView::event(QEvent*) (MapView?.cpp:1189)
==7725== by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==
==7725== Jump to the invalid address stated on the next line
==7725== at 0x0: ???
==7725== by 0x4911CB: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature?*>::iterator, MapFeature?*, SortAccordingToRenderingPriority?>(QList<MapFeature?*>::iterator, QList<MapFeature?*>::iterator, MapFeature?* const&, SortAccordingToRenderingPriority?) (qalgorithms.h:397)
==7725== by 0x48F34C: void qSort<QList<MapFeature?*>::iterator, SortAccordingToRenderingPriority?>(QList<MapFeature?*>::iterator, QList<MapFeature?*>::iterator, SortAccordingToRenderingPriority?) (qalgorithms.h:204)
==7725== by 0x5A5BCD: MapView::sortRenderingPriority() (MapView?.cpp:299)
==7725== by 0x5A656A: MapView::buildFeatureSet() (MapView?.cpp:368)
==7725== by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView?.cpp:193)
==7725== by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x5AAD78: MapView::event(QEvent*) (MapView?.cpp:1189)
==7725== by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7725== by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==7725==
==7725==
==7725== Process terminating with default action of signal 11 (SIGSEGV)
==7725== Bad permissions for mapped region at address 0x0
==7725== at 0x0: ???
==7725== by 0x4911CB: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature?*>::iterator, MapFeature?*, SortAccordingToRenderingPriority?>(QList<MapFeature?*>::iterator, QList<MapFeature?*>::iterator, MapFeature?* const&, SortAccordingToRenderingPriority?) (qalgorithms.h:397)
==7725== by 0x48F34C: void qSort<QList<MapFeature?*>::iterator, SortAccordingToRenderingPriority?>(QList<MapFeature?*>::iterator, QList<MapFeature?*>::iterator, SortAccordingToRenderingPriority?) (qalgorithms.h:204)
==7725== by 0x5A5BCD: MapView::sortRenderingPriority() (MapView?.cpp:299)
==7725== by 0x5A656A: MapView::buildFeatureSet() (MapView?.cpp:368)
==7725== by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView?.cpp:193)
==7725== by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x5AAD78: MapView::event(QEvent*) (MapView?.cpp:1189)
==7725== by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7725== by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)

comment:9 follow-up: Changed 8 years ago by dantje

The crash still happens. The sorting somehow still knows about the virtual node that should have been removed.

PS: And sorry for the last entry.

==7725== Invalid read of size 8
==7725==    at 0x48ED7A: SortAccordingToRenderingPriority::operator()(MapFeature*, MapFeature*) (SortAccordingToRenderingPriority.h:14)
==7725==    by 0x4911CB: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature*>::iterator, MapFeature*, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, MapFeature* const&, SortAccordingToRenderingPriority) (qalgorithms.h:397)
==7725==    by 0x48F34C: void qSort<QList<MapFeature*>::iterator, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, SortAccordingToRenderingPriority) (qalgorithms.h:204)
==7725==    by 0x5A5BCD: MapView::sortRenderingPriority() (MapView.cpp:299)
==7725==    by 0x5A656A: MapView::buildFeatureSet() (MapView.cpp:368)
==7725==    by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView.cpp:193)
==7725==    by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x5AAD78: MapView::event(QEvent*) (MapView.cpp:1189)
==7725==    by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7725==    by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==  Address 0x17312380 is 0 bytes inside a block of size 96 free'd
==7725==    at 0x4C24A7A: operator delete(void*) (vg_replace_malloc.c:346)
==7725==    by 0x598D63: TrackPoint::~TrackPoint() (TrackPoint.cpp:49)
==7725==    by 0x483BA1: MapLayer::deleteFeature(MapFeature*) (MapLayer.cpp:232)
==7725==    by 0x563EA5: Road::updateVirtuals() (Road.cpp:200)
==7725==    by 0x564917: Road::updateMeta() (Road.cpp:338)
==7725==    by 0x564E61: Road::isCoastline() (Road.cpp:389)
==7725==    by 0x5A6296: MapView::buildFeatureSet() (MapView.cpp:351)
==7725==    by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView.cpp:193)
==7725==    by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x5AAD78: MapView::event(QEvent*) (MapView.cpp:1189)
==7725==    by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725== 
==7725== Jump to the invalid address stated on the next line
==7725==    at 0x0: ???
==7725==    by 0x4911CB: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature*>::iterator, MapFeature*, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, MapFeature* const&, SortAccordingToRenderingPriority) (qalgorithms.h:397)
==7725==    by 0x48F34C: void qSort<QList<MapFeature*>::iterator, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, SortAccordingToRenderingPriority) (qalgorithms.h:204)
==7725==    by 0x5A5BCD: MapView::sortRenderingPriority() (MapView.cpp:299)
==7725==    by 0x5A656A: MapView::buildFeatureSet() (MapView.cpp:368)
==7725==    by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView.cpp:193)
==7725==    by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x5AAD78: MapView::event(QEvent*) (MapView.cpp:1189)
==7725==    by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7725==    by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==7725== 
==7725== 
==7725== Process terminating with default action of signal 11 (SIGSEGV)
==7725==  Bad permissions for mapped region at address 0x0
==7725==    at 0x0: ???
==7725==    by 0x4911CB: void QAlgorithmsPrivate::qSortHelper<QList<MapFeature*>::iterator, MapFeature*, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, MapFeature* const&, SortAccordingToRenderingPriority) (qalgorithms.h:397)
==7725==    by 0x48F34C: void qSort<QList<MapFeature*>::iterator, SortAccordingToRenderingPriority>(QList<MapFeature*>::iterator, QList<MapFeature*>::iterator, SortAccordingToRenderingPriority) (qalgorithms.h:204)
==7725==    by 0x5A5BCD: MapView::sortRenderingPriority() (MapView.cpp:299)
==7725==    by 0x5A656A: MapView::buildFeatureSet() (MapView.cpp:368)
==7725==    by 0x5A4264: MapView::paintEvent(QPaintEvent*) (MapView.cpp:193)
==7725==    by 0x675279F: QWidget::event(QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x5AAD78: MapView::event(QEvent*) (MapView.cpp:1189)
==7725==    by 0x6703EFB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x670B1CD: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.5.2)
==7725==    by 0x7576C2B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.5.2)
==7725==    by 0x6759B92: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) (in /usr/lib/libQtGui.so.4.5.2)

comment:10 Changed 8 years ago by dantje

Easier steps to reproduce, even without downloading:

  • Enable virtual nodes
  • Draw a road and finish it
  • Move the last node
  • Add new segments to that same road and finish it
  • Move the last node
  • [crash]

It is also possible to do this with circular roads that contain one of it's nodes twice.

comment:11 in reply to: ↑ 9 ; follow-up: Changed 8 years ago by Koying

Replying to dantje:

The crash still happens. The sorting somehow still knows about the virtual node that should have been removed.

Did you try to move a node or did it crash immediately after the download?

comment:12 in reply to: ↑ 11 Changed 8 years ago by dantje

Replying to Koying:

Replying to dantje:

The crash still happens. The sorting somehow still knows about the virtual node that should have been removed.

Did you try to move a node or did it crash immediately after the download?

When downloading an (somehow) overlapping area, the crash occurs immediately after download/parsing.

comment:13 Changed 8 years ago by koying

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [19351]) FIX : actual (hopefully) fix for #2615: update virtual when road changes layer + do not update virtuals (in is Coastline()) after features are selected (fixes #2615)

comment:14 Changed 8 years ago by dantje

Fix verified. Works for me. Thanks.

Note: See TracTickets for help on using tickets.