Opened 10 years ago

Closed 10 years ago

#1958 closed defect (fixed)

Crash on pressing Page Down key

Reported by: Ed Avis Owned by: cbro@…
Priority: major Milestone:
Component: merkaartor Version:
Keywords: crash Cc:

Description

To reproduce: start Merkaartor, press Download, download an area such as <http://matt.sandbox.cloudmade.com/?zoom=18&lat=51.562&lon=-0.008&layers=0B> and select the road in the middle of the map. In the Properties tab double-click on the value of the 'name' property to edit the text. Press Page Down and the app suddenly crashes. I am using Merkaator 0.13.2-2 packaged with Fedora 11 x86_64. Here is a backtrace:

Program terminated with signal 11, Segmentation fault.
#0  QString::size (this=<value optimized out>) at ../../src/corelib/tools/qstring.h:104
104	    inline int size() const { return d->size; }
(gdb) bt
#0  QString::size (this=<value optimized out>) at ../../src/corelib/tools/qstring.h:104
#1  QString::operator== (this=<value optimized out>) at tools/qstring.cpp:1912
#2  0x00000000005f2aea in GeoImageDock::setImage (this=0x1cde780, ImageId=0) at GeoImageDock.cpp:85
#3  0x0000000000603aec in GeoImageDock::qt_metacall (this=0x1cde780, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=<value optimized out>) at tmp/moc_GeoImageDock.cpp:72
#4  0x0000003aabf58612 in QMetaObject::activate (sender=0x1ccf9e0, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=0x2) at kernel/qobject.cpp:3069
#5  0x0000003aacd87f97 in QAction::triggered (this=0x0, _t1=false) at .moc/release-shared/moc_qaction.cpp:236
#6  0x0000003aacd893ff in QAction::activate (this=0x1ccf9e0, event=<value optimized out>) at kernel/qaction.cpp:1160
#7  0x0000003aacd8bf0f in QAction::event (this=0x0, e=<value optimized out>) at kernel/qaction.cpp:1079
#8  0x0000003aacd8deac in QApplicationPrivate::notify_helper (this=0x1153a70, receiver=0x1ccf9e0, e=0x7fffc0305940) at kernel/qapplication.cpp:4084
#9  0x0000003aacd954de in QApplication::notify (this=0x7fffc03073e0, receiver=0x1ccf9e0, e=0x7fffc0305940) at kernel/qapplication.cpp:4049
#10 0x0000003aabf42b7c in QCoreApplication::notifyInternal (this=0x7fffc03073e0, receiver=0x1ccf9e0, event=0x7fffc0305940) at kernel/qcoreapplication.cpp:602
#11 0x0000003aacdc2f06 in QCoreApplication::sendEvent (event=<value optimized out>, receiver=<value optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:213
#12 QShortcutMap::dispatchEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qshortcutmap.cpp:883
#13 0x0000003aacdc4e37 in QShortcutMap::tryShortcutEvent (this=0x1153b88, o=<value optimized out>, e=0x7fffc0305d80) at kernel/qshortcutmap.cpp:369
#14 0x0000003aacd9643a in QApplication::notify (this=0x7fffc03073e0, receiver=0x23184c0, e=0x7fffc0305d80) at kernel/qapplication.cpp:3673
#15 0x0000003aabf42b7c in QCoreApplication::notifyInternal (this=0x7fffc03073e0, receiver=0x23184c0, event=0x7fffc0305d80) at kernel/qcoreapplication.cpp:602
#16 0x0000003aace1e97a in QKeyMapper::sendKeyEvent (keyWidget=0x23184c0, grab=<value optimized out>, type=QEvent::KeyPress, code=16777239, modifiers=<value optimized out>, text=@0x7fffc0305fa0, 
    autorepeat=false, count=1, nativeScanCode=117, nativeVirtualKey=65366, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1675
#17 0x0000003aace20f50 in QKeyMapperPrivate::translateKeyEvent (this=0x11a1d50, keyWidget=0x23184c0, event=<value optimized out>, grab=160) at kernel/qkeymapper_x11.cpp:1645
#18 0x0000003aacdfa2d4 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffc0306b10) at kernel/qapplication_x11.cpp:3436
#19 0x0000003aace22934 in x11EventSourceDispatch (s=<value optimized out>, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#20 0x0000003aa4e3818e in g_main_dispatch (context=<value optimized out>) at gmain.c:1814
#21 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2367
#22 0x0000003aa4e3b8e8 in g_main_context_iterate (context=0x1159d20, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2448
#23 0x0000003aa4e3ba5c in IA__g_main_context_iteration (context=0x1159d20, may_block=1) at gmain.c:2511
#24 0x0000003aabf6bfa6 in QEventDispatcherGlib::processEvents (this=0x1153a10, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:323
#25 0x0000003aace220de in QGuiEventDispatcherGlib::processEvents (this=0x0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#26 0x0000003aabf41452 in QEventLoop::processEvents (this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:149
#27 0x0000003aabf41824 in QEventLoop::exec (this=0x7fffc0306e40, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:200

Change History (3)

comment:1 Changed 10 years ago by Ed Avis

I can reproduce this with Merkaartor 0.13.2 built from source. I need to comment out the call to QApplication::setStyle in Main.cpp, otherwise the app crashes on startup, but apart from that it's a vanilla build using 'qmake-qt4 Merkaartor.pro PREFIX=$HOME NODEBUG=0 GEOIMAGE=1 GPSD=1 GDAL=1 NVIDIA_HACK=1 FORCE_CUSTOM_STYLE=1'.

The bug appears to be an assertion failure. Here is the gdb session and backtrace:

% gdb merkaartor GNU gdb (GDB) Fedora (6.8.50.20090302-23.fc11) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... (gdb) run Starting program: /home/ed/bin/merkaartor warning: "/usr/lib/debug/usr/lib64/libQtWebKit.so.4.5.0.debug": The separate debug info file has no debug info [Thread debugging using libthread_db enabled] warning: "/usr/lib/debug/usr/lib64/atlas/liblapack.so.3.0.debug": The separate debug info file has no debug info warning: "/usr/lib/debug/usr/lib64/atlas/libf77blas.so.3.0.debug": The separate debug info file has no debug info warning: "/usr/lib/debug/usr/lib64/atlas/libcblas.so.3.0.debug": The separate debug info file has no debug info warning: "/usr/lib/debug/usr/lib64/atlas/libatlas.so.3.0.debug": The separate debug info file has no debug info Starting Merkaartor [New Thread 0x7fffe934f910 (LWP 3862)] "/api/0.6/map?bbox=-0.010209,51.560627,-0.005791,51.563373" 200 "OK" ASSERT failure in QList<T>::at: "index out of range", file /usr/include/QtCore/qlist.h, line 395

Program received signal SIGABRT, Aborted. 0x0000003aa36332f5 in *GI_raise (sig=<value optimized out>)

at ../nptl/sysdeps/unix/sysv/linux/raise.c:64

64 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); Current language: auto; currently minimal (gdb) bt #0 0x0000003aa36332f5 in *GI_raise (sig=<value optimized out>)

at ../nptl/sysdeps/unix/sysv/linux/raise.c:64

#1 0x0000003aa3634b20 in *GI_abort () at abort.c:88 #2 0x0000003aabe52344 in qt_message_output (msgType=QtFatalMsg?,

buf=<value optimized out>) at global/qglobal.cpp:2006

#3 0x0000003aabe52496 in qFatal (msg=<value optimized out>)

at global/qglobal.cpp:2201

#4 0x000000000063a6d9 in QList<GeoImageDock::TrackPointData>::at (

this=0x1514cc0, i=0) at /usr/include/QtCore/qlist.h:395

#5 0x0000000000632afe in GeoImageDock::setImage (this=0x1514c80, ImageId?=0)

at GeoImageDock?.cpp:85

#6 0x0000000000632f5a in GeoImageDock::selectNext (this=0x1514c80)

at GeoImageDock?.cpp:141

#7 0x00000000006476b0 in GeoImageDock::qt_metacall (this=0x1514c80,

_c=QMetaObject::InvokeMetaMethod?, _id=2, _a=0x7fffffffc6d0) at tmp/moc_GeoImageDock.cpp:72

#8 0x0000003aabf58612 in QMetaObject::activate (sender=0x1508220,

from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3069

#9 0x0000003aacd87f97 in QAction::triggered (this=0xf13, _t1=false)

at .moc/release-shared/moc_qaction.cpp:236

#10 0x0000003aacd893ff in QAction::activate (this=0x1508220,

event=<value optimized out>) at kernel/qaction.cpp:1160

#11 0x0000003aacd8bf0f in QAction::event (this=0xf13, e=<value optimized out>)

at kernel/qaction.cpp:1079

#12 0x0000003aacd8deac in QApplicationPrivate::notify_helper (this=0x986a70,

receiver=0x1508220, e=0x7fffffffcad0) at kernel/qapplication.cpp:4084

#13 0x0000003aacd954de in QApplication::notify (this=0x7fffffffe570,

receiver=0x1508220, e=0x7fffffffcad0) at kernel/qapplication.cpp:4049

#14 0x0000003aabf42b7c in QCoreApplication::notifyInternal (this=

0x7fffffffe570, receiver=0x1508220, event=0x7fffffffcad0) at kernel/qcoreapplication.cpp:602

#15 0x0000003aacdc2f06 in QCoreApplication::sendEvent (

event=<value optimized out>, receiver=<value optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:213

#16 QShortcutMap::dispatchEvent (event=<value optimized out>,

receiver=<value optimized out>) at kernel/qshortcutmap.cpp:883

#17 0x0000003aacdc4e37 in QShortcutMap::tryShortcutEvent (this=0x986b88,

o=<value optimized out>, e=0x7fffffffcf10) at kernel/qshortcutmap.cpp:369

#18 0x0000003aacd9643a in QApplication::notify (this=0x7fffffffe570,

receiver=0x13de230, e=0x7fffffffcf10) at kernel/qapplication.cpp:3673

#19 0x0000003aabf42b7c in QCoreApplication::notifyInternal (

this=0x7fffffffe570, receiver=0x13de230, event=0x7fffffffcf10) at kernel/qcoreapplication.cpp:602

#20 0x0000003aace1e97a in QKeyMapper::sendKeyEvent (keyWidget=0x13de230,

grab=<value optimized out>, type=QEvent::KeyPress?, code=16777239, modifiers=<value optimized out>, text=@0x7fffffffd130, autorepeat=false, count=1, nativeScanCode=117, nativeVirtualKey=65366, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1675

#21 0x0000003aace20f50 in QKeyMapperPrivate::translateKeyEvent (

this=0x9d4d40, keyWidget=0x13de230, event=<value optimized out>, grab=19) at kernel/qkeymapper_x11.cpp:1645

#22 0x0000003aacdfa2d4 in QApplication::x11ProcessEvent (

this=<value optimized out>, event=0x7fffffffdca0) at kernel/qapplication_x11.cpp:3436

#23 0x0000003aace22934 in x11EventSourceDispatch (s=<value optimized out>,

callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146

#24 0x0000003aa4e3818e in g_main_dispatch (context=<value optimized out>)

at gmain.c:1814

#25 IAg_main_context_dispatch (context=<value optimized out>)

at gmain.c:2367

#26 0x0000003aa4e3b8e8 in g_main_context_iterate (context=0x98cd20,

block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2448

#27 0x0000003aa4e3ba5c in IAg_main_context_iteration (context=0x98cd20,

may_block=1) at gmain.c:2511

#28 0x0000003aabf6bfa6 in QEventDispatcherGlib::processEvents (this=0x986a10,

flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:323

#29 0x0000003aace220de in QGuiEventDispatcherGlib::processEvents (this=0xf13,

flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202

#30 0x0000003aabf41452 in QEventLoop::processEvents (

this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.

) at kernel/qeventloop.cpp:149 #31 0x0000003aabf41824 in QEventLoop::exec (this=0x7fffffffdfd0, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece. )

at kernel/qeventloop.cpp:200

#32 0x0000003aabf43919 in QCoreApplication::exec ()

at kernel/qcoreapplication.cpp:880

#33 0x00000000005016f8 in main (argc=1, argv=0x7fffffffe7a8) at Main.cpp:54 (gdb)

comment:2 Changed 10 years ago by Ed Avis

Sorry, forgot to use wiki markup, here it is again:

% gdb merkaartor
GNU gdb (GDB) Fedora (6.8.50.20090302-23.fc11)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) run
Starting program: /home/ed/bin/merkaartor 
warning: "/usr/lib/debug/usr/lib64/libQtWebKit.so.4.5.0.debug": The separate debug info file has no debug info
[Thread debugging using libthread_db enabled]
warning: "/usr/lib/debug/usr/lib64/atlas/liblapack.so.3.0.debug": The separate debug info file has no debug info
warning: "/usr/lib/debug/usr/lib64/atlas/libf77blas.so.3.0.debug": The separate debug info file has no debug info
warning: "/usr/lib/debug/usr/lib64/atlas/libcblas.so.3.0.debug": The separate debug info file has no debug info
warning: "/usr/lib/debug/usr/lib64/atlas/libatlas.so.3.0.debug": The separate debug info file has no debug info
Starting Merkaartor 
[New Thread 0x7fffe934f910 (LWP 3862)]
"/api/0.6/map?bbox=-0.010209,51.560627,-0.005791,51.563373" 
200 
"OK" 
ASSERT failure in QList<T>::at: "index out of range", file /usr/include/QtCore/qlist.h, line 395

Program received signal SIGABRT, Aborted.
0x0000003aa36332f5 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Current language:  auto; currently minimal
(gdb) bt
#0  0x0000003aa36332f5 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x0000003aa3634b20 in *__GI_abort () at abort.c:88
#2  0x0000003aabe52344 in qt_message_output (msgType=QtFatalMsg, 
    buf=<value optimized out>) at global/qglobal.cpp:2006
#3  0x0000003aabe52496 in qFatal (msg=<value optimized out>)
    at global/qglobal.cpp:2201
#4  0x000000000063a6d9 in QList<GeoImageDock::TrackPointData>::at (
    this=0x1514cc0, i=0) at /usr/include/QtCore/qlist.h:395
#5  0x0000000000632afe in GeoImageDock::setImage (this=0x1514c80, ImageId=0)
    at GeoImageDock.cpp:85
#6  0x0000000000632f5a in GeoImageDock::selectNext (this=0x1514c80)
    at GeoImageDock.cpp:141
#7  0x00000000006476b0 in GeoImageDock::qt_metacall (this=0x1514c80, 
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffffffc6d0)
    at tmp/moc_GeoImageDock.cpp:72
#8  0x0000003aabf58612 in QMetaObject::activate (sender=0x1508220, 
    from_signal_index=<value optimized out>, 
    to_signal_index=<value optimized out>, argv=0xffffffffffffffff)
    at kernel/qobject.cpp:3069
#9  0x0000003aacd87f97 in QAction::triggered (this=0xf13, _t1=false)
    at .moc/release-shared/moc_qaction.cpp:236
#10 0x0000003aacd893ff in QAction::activate (this=0x1508220, 
    event=<value optimized out>) at kernel/qaction.cpp:1160
#11 0x0000003aacd8bf0f in QAction::event (this=0xf13, e=<value optimized out>)
    at kernel/qaction.cpp:1079
#12 0x0000003aacd8deac in QApplicationPrivate::notify_helper (this=0x986a70, 
    receiver=0x1508220, e=0x7fffffffcad0) at kernel/qapplication.cpp:4084
#13 0x0000003aacd954de in QApplication::notify (this=0x7fffffffe570, 
    receiver=0x1508220, e=0x7fffffffcad0) at kernel/qapplication.cpp:4049
#14 0x0000003aabf42b7c in QCoreApplication::notifyInternal (this=
    0x7fffffffe570, receiver=0x1508220, event=0x7fffffffcad0)
    at kernel/qcoreapplication.cpp:602
#15 0x0000003aacdc2f06 in QCoreApplication::sendEvent (
    event=<value optimized out>, receiver=<value optimized out>)
    at ../../src/corelib/kernel/qcoreapplication.h:213
#16 QShortcutMap::dispatchEvent (event=<value optimized out>, 
    receiver=<value optimized out>) at kernel/qshortcutmap.cpp:883
#17 0x0000003aacdc4e37 in QShortcutMap::tryShortcutEvent (this=0x986b88, 
    o=<value optimized out>, e=0x7fffffffcf10) at kernel/qshortcutmap.cpp:369
#18 0x0000003aacd9643a in QApplication::notify (this=0x7fffffffe570, 
    receiver=0x13de230, e=0x7fffffffcf10) at kernel/qapplication.cpp:3673
#19 0x0000003aabf42b7c in QCoreApplication::notifyInternal (
    this=0x7fffffffe570, receiver=0x13de230, event=0x7fffffffcf10)
    at kernel/qcoreapplication.cpp:602
#20 0x0000003aace1e97a in QKeyMapper::sendKeyEvent (keyWidget=0x13de230, 
    grab=<value optimized out>, type=QEvent::KeyPress, code=16777239, 
    modifiers=<value optimized out>, text=@0x7fffffffd130, autorepeat=false, 
    count=1, nativeScanCode=117, nativeVirtualKey=65366, nativeModifiers=0)
    at kernel/qkeymapper_x11.cpp:1675
#21 0x0000003aace20f50 in QKeyMapperPrivate::translateKeyEvent (
    this=0x9d4d40, keyWidget=0x13de230, event=<value optimized out>, grab=19)
    at kernel/qkeymapper_x11.cpp:1645
#22 0x0000003aacdfa2d4 in QApplication::x11ProcessEvent (
    this=<value optimized out>, event=0x7fffffffdca0)
    at kernel/qapplication_x11.cpp:3436
#23 0x0000003aace22934 in x11EventSourceDispatch (s=<value optimized out>, 
    callback=<value optimized out>, user_data=<value optimized out>)
    at kernel/qguieventdispatcher_glib.cpp:146
#24 0x0000003aa4e3818e in g_main_dispatch (context=<value optimized out>)
    at gmain.c:1814
#25 IA__g_main_context_dispatch (context=<value optimized out>)
    at gmain.c:2367
#26 0x0000003aa4e3b8e8 in g_main_context_iterate (context=0x98cd20, 
    block=<value optimized out>, dispatch=<value optimized out>, 
    self=<value optimized out>) at gmain.c:2448
#27 0x0000003aa4e3ba5c in IA__g_main_context_iteration (context=0x98cd20, 
    may_block=1) at gmain.c:2511
#28 0x0000003aabf6bfa6 in QEventDispatcherGlib::processEvents (this=0x986a10, 
    flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:323
#29 0x0000003aace220de in QGuiEventDispatcherGlib::processEvents (this=0xf13, 
    flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#30 0x0000003aabf41452 in QEventLoop::processEvents (
    this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:149
#31 0x0000003aabf41824 in QEventLoop::exec (this=0x7fffffffdfd0, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
)
    at kernel/qeventloop.cpp:200
#32 0x0000003aabf43919 in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:880
#33 0x00000000005016f8 in main (argc=1, argv=0x7fffffffe7a8) at Main.cpp:54
(gdb)

comment:3 Changed 10 years ago by Chris Browet

Resolution: fixed
Status: newclosed

Looking at the 0.13.2 code vs. svn, I think this is already solved in svn.

Re the setStyle, AFAIK, there is none in 0.13.2 Main.cpp... Where does your source come from?

Note: See TracTickets for help on using tickets.