Opened 9 years ago

Closed 8 years ago

#2200 closed defect (fixed)

Merkaartor crashes on editing style None.mas

Reported by: stefan@… Owned by: cbro@…
Priority: major Milestone:
Component: merkaartor Version:
Keywords: styleeditor, merkaartor Cc:

Description

Subject says all... and lost me a bunch of work.

MerkaartorPreferences::fromOsmPref : "GET /api/0.6/user/preferences/"
Downloader::go: "/api/0.6/map?bbox=4.896132,52.367865,4.905856,52.373329"
ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 403
Afgebroken

Attachments (1)

2200.patch (474 bytes) - added by openstreetmap.org@… 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by Koying

More details, please...

When did it crash? Saving? After a delete? After add?

comment:2 Changed 8 years ago by openstreetmap.org@…

I can confirm this problem. To reproduce:

  • Start merkaartor empty
  • Select Tools → Style → None.mas
  • Select Tools → Style → Edit...

Backtrace:

(gdb) bt                                 
#0  0xb7fe1424 in __kernel_vsyscall ()
#1  0xb5a043d0 in raise () from /lib/i686/cmov/libc.so.6
#2  0xb5a07a85 in abort () from /lib/i686/cmov/libc.so.6
#3  0x0822a73e in myMessageOutput (msgType=QtFatalMsg,
    buf=0x89d1818 "ASSERT failure in QList<T>::operator[]: \"index out of range\", file /usr/include/qt4/QtCore/qlist.h, line 403") at Main.cpp:63
#4  0xb5d0c3d5 in qt_message_output (msgType=QtFatalMsg,
    buf=0x89d1818 "ASSERT failure in QList<T>::operator[]: \"index out of range\", file /usr/include/qt4/QtCore/qlist.h, line 403")
    at global/qglobal.cpp:2007
#5  0xb5d0c511 in qFatal (msg=0xb5e56ce8 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qglobal.cpp:2241
#6  0xb5d0c5bc in qt_assert_x (where=0x8354ac3 "QList<T>::operator[]", what=0x8354ab0 "index out of range",
    file=0x8354a90 "/usr/include/qt4/QtCore/qlist.h", line=403) at global/qglobal.cpp:1819
#7  0x081f562c in QList<FeaturePainter>::operator[] (this=0x896b5fc, i=-1) at /usr/include/qt4/QtCore/qlist.h:403
#8  0x08206266 in PaintStyleEditor::on_PaintList_itemSelectionChanged (this=0x896b3b0) at PaintStyle/PaintStyleEditor.cpp:124
#9  0x08207670 in PaintStyleEditor (this=0x896b3b0, aParent=0xbfffede0, aGlobalPainter=..., aPainters=...) at PaintStyle/PaintStyleEditor.cpp:50
#10 0x082368cd in MainWindow::on_editMapStyleAction_triggered (this=0xbfffede0) at MainWindow.cpp:1538
#11 0x08328615 in MainWindow::qt_metacall (this=0xbfffede0, _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0xbfffce0c) at moc_MainWindow.cpp:321
#12 0xb5e1ab33 in QMetaObject::activate (sender=0x89117d8, from_signal_index=5, to_signal_index=6, argv=0xbfffce0c) at kernel/qobject.cpp:3112
#13 0xb5e1af60 in QMetaObject::activate (sender=0x89117d8, m=0x8497708, from_local_signal_index=1, to_local_signal_index=2, argv=0xbfffce0c)
    at kernel/qobject.cpp:3206
#14 0xb614e311 in QAction::triggered (this=0x89117d8, _t1=false) at .moc/release-shared/moc_qaction.cpp:236
#15 0xb614f85f in QAction::activate (this=0x89117d8, event=QAction::Trigger) at kernel/qaction.cpp:1160
#16 0xb6594ce4 in QMenuPrivate::activateCausedStack (this=0x852b8f0, causedStack=..., action=0x89117d8, action_e=QAction::Trigger, self=true)
    at widgets/qmenu.cpp:967
#17 0xb659b3eb in QMenuPrivate::activateAction (this=0x852b8f0, action=0x89117d8, action_e=QAction::Trigger, self=<value optimized out>)
    at widgets/qmenu.cpp:1060
#18 0xb659bf32 in QMenu::mouseReleaseEvent (this=0x852e330, e=0xbfffd51c) at widgets/qmenu.cpp:2254
#19 0xb61aa77b in QWidget::event (this=0x852e330, event=0xbfffd51c) at kernel/qwidget.cpp:7549
#20 0xb659e171 in QMenu::event (this=0x852e330, e=0xbfffd51c) at widgets/qmenu.cpp:2353
#21 0xb6154814 in QApplicationPrivate::notify_helper (this=0x849d358, receiver=0x852e330, e=0xbfffd51c) at kernel/qapplication.cpp:4056
#22 0xb615d2e1 in QApplication::notify (this=0xbffff0d4, receiver=0x852e330, e=0xbfffd51c) at kernel/qapplication.cpp:3758
#23 0xb5e059cb in QCoreApplication::notifyInternal (this=0xbffff0d4, receiver=0x852e330, event=0xbfffd51c) at kernel/qcoreapplication.cpp:610
#24 0xb615c36e in QCoreApplication::sendSpontaneousEvent (receiver=0x852e330, event=0xbfffd51c, alienWidget=0x0, nativeWidget=0x852e330,
    buttonDown=0xb69caaa0, lastMouseReceiver=...) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#25 QApplicationPrivate::sendMouseEvent (receiver=0x852e330, event=0xbfffd51c, alienWidget=0x0, nativeWidget=0x852e330, buttonDown=0xb69caaa0,
    lastMouseReceiver=...) at kernel/qapplication.cpp:2924
#26 0xb61cb0ef in QETWidget::translateMouseEvent (this=0x852e330, event=0xbfffeacc) at kernel/qapplication_x11.cpp:4343
#27 0xb61ca386 in QApplication::x11ProcessEvent (this=0xbffff0d4, event=0xbfffeacc) at kernel/qapplication_x11.cpp:3428
#28 0xb61f4892 in x11EventSourceDispatch (s=0x84a1300, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#29 0xb4d7e4b8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#30 0xb4d81a13 in ?? () from /usr/lib/libglib-2.0.so.0
#31 0xb4d81b98 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#32 0xb5e30858 in QEventDispatcherGlib::processEvents (this=0x849e130, flags=...) at kernel/qeventdispatcher_glib.cpp:327
#33 0xb61f3fd5 in QGuiEventDispatcherGlib::processEvents (this=0x849e130, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#34 0xb5e0401a in QEventLoop::processEvents (this=0xbfffed30, flags=...) at kernel/qeventloop.cpp:149
#35 0xb5e04462 in QEventLoop::exec (this=0xbfffed30, flags=...) at kernel/qeventloop.cpp:201
#36 0xb5e068b9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#37 0xb6154697 in QApplication::exec () at kernel/qapplication.cpp:3525
#38 0x0822a05b in main (argc=Cannot access memory at address 0x1277
) at Main.cpp:201

Changed 8 years ago by openstreetmap.org@…

comment:3 Changed 8 years ago by openstreetmap.org@…

I think the problem is just that for an empty list, the "current" list index is -1. The attached one-liner fixes it for me.

comment:4 Changed 8 years ago by koying

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

(In [17844]) FIX : crashes on editing style None.mas by Stefan (Konink?) (fixes #2200)

Note: See TracTickets for help on using tickets.