[Merkaartor] merkaartor freezes while opening gpx files

Sven Lankes sven at lank.es
Thu May 15 08:12:27 BST 2008


On Thu, May 15, 2008 at 07:03:39AM +0200, bvh wrote:

> > Merkaartor starts - I open a 200-300k gpx file and it freezes taking
> > 100% cpu until I kill it.

> First regenerate your strace with the option -tt, this will include
> timestamps on the strace so that we can see where the delay actually
> is. 

It hangs at the end of the strace: 

http://killefiz.de/tmp/merkaartor/merkaartor.trace-tt

> Another method might be to run merkaartor in gdb from the command
> line and then hit ctrl-c inside the console : this way gdb will
> break merkaartor and then you can give the command 
> bt
> to generate a backtrace so that we can see where merkaartor is in
> the callstack.

#0  0x00638a58 in QDashStroker::processCurrentSubpath () from /usr/lib/libQtGui.so.4
#1  0x00635f68 in QStrokerOps::end () from /usr/lib/libQtGui.so.4
#2  0x00524302 in QDashStroker::end () from /usr/lib/libQtGui.so.4
#3  0x00637ee3 in QStrokerOps::strokePath () from /usr/lib/libQtGui.so.4
#4  0x006153e2 in QPainterPathStroker::createStroke () from /usr/lib/libQtGui.so.4
#5  0x0068e15c in ?? () from /usr/lib/libQtGui.so.4
#6  0x0068e56f in ?? () from /usr/lib/libQtGui.so.4
#7  0x00602f2a in QPaintEngine::drawLines () from /usr/lib/libQtGui.so.4
#8  0x00690beb in ?? () from /usr/lib/libQtGui.so.4
#9  0x0060cdd4 in QPainter::drawLines () from /usr/lib/libQtGui.so.4
#10 0x0807a100 in QPainter::drawLine (this=0xbfd922a8, l=@0xbfd91ef8)
    at /usr/include/QtGui/qpainter.h:489
#11 0x0807a133 in QPainter::drawLine (this=0xbfd922a8, p1=@0xbfd91fd8, p2=@0xbfd91fc8)
    at /usr/include/QtGui/qpainter.h:511
#12 0x0808a6fa in TrackSegment::draw (this=0x96996b0, P=@0xbfd922a8, theProjection=@0x9397cac)
    at Map/TrackSegment.cpp:82
#13 0x0808bfb3 in MapView::updateStaticBuffer (this=0x9397c90) at MapView.cpp:164
#14 0x0808c434 in MapView::paintEvent (this=0x9397c90, anEvent=0xbfd92824) at MapView.cpp:98
#15 0x00577489 in QWidget::event () from /usr/lib/libQtGui.so.4
#16 0x0052f23f in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#17 0x00535b52 in QApplication::notify () from /usr/lib/libQtGui.so.4
#18 0x002fac1b in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#19 0x0057de9e in ?? () from /usr/lib/libQtGui.so.4
#20 0x00698911 in QWidgetPrivate::drawWidget () from /usr/lib/libQtGui.so.4
#21 0x00698fa8 in ?? () from /usr/lib/libQtGui.so.4
#22 0x00698e53 in ?? () from /usr/lib/libQtGui.so.4
#23 0x006984ed in QWidgetPrivate::drawWidget () from /usr/lib/libQtGui.so.4
#24 0x006997f5 in ?? () from /usr/lib/libQtGui.so.4
#25 0x00699c92 in ?? () from /usr/lib/libQtGui.so.4
#26 0x00577857 in QWidget::event () from /usr/lib/libQtGui.so.4
#27 0x0052f23f in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#28 0x00535b52 in QApplication::notify () from /usr/lib/libQtGui.so.4
#29 0x002fac1b in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#30 0x002fcbc8 in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/libQtCore.so.4
#31 0x002fcdbd in QCoreApplication::sendPostedEvents () from /usr/lib/libQtCore.so.4
#32 0x0031d153 in ?? () from /usr/lib/libQtCore.so.4
#33 0x073e2098 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#34 0x073e5743 in ?? () from /lib/libglib-2.0.so.0
#35 0x073e5901 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#36 0x0031cdd2 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#37 0x005adb75 in ?? () from /usr/lib/libQtGui.so.4
#38 0x002f9942 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#39 0x002f9b32 in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#40 0x002fce7d in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#41 0x0052ef87 in QApplication::exec () from /usr/lib/libQtGui.so.4
#42 0x080bd930 in main (argc=64, argv=0x2) at Main.cpp:22

> For now the only thing that I can see is the number of 
> QDateTime::currentDateTime() calls in the MapFeature constructor.
> Try replacing in MapFeature.cpp the lines with
> theFeature(0), LastPartNotification(0), Time(QDateTime::currentDateTime())
> into
> theFeature(0), LastPartNotification(0), Time(QDateTime())
> near the beginning of the file (it appears twice)

That change gets rid of the calls but the problem persists.

-- 
sven === jabber/xmpp: sven at lankes.net




More information about the Merkaartor mailing list