Bug 291821 - Crash when removing a custom presence
Summary: Crash when removing a custom presence
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: contactlist (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: 0.4.0
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 00:26 UTC by Daniele E. Domenichelli
Modified: 2012-07-06 12:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniele E. Domenichelli 2012-01-18 00:26:59 UTC
Application: ktp-contactlist (0.2.60)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.8.0
Operating System: Linux 3.1.0-1-amd64 x86_64
Distribution: Debian GNU/Linux testing (wheezy)

-- Information about the crash:
- What I was doing when the application crashed:
Remove a custom presence from the "Edit Custom Presences" dialog, contact list crashes

The crash can be reproduced every time.

-- Backtrace:
Application: KDE Telepathy Contact List (ktp-contactlist), signal: Aborted
[KCrash Handler]
#6  0x00007f2c48a86405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007f2c48a89680 in *__GI_abort () at abort.c:92
#8  0x00007f2c4b21c871 in qt_message_output (msgType=<optimized out>, buf=0x100c6a8 "ASSERT failure in QList<T>::operator[]: \"index out of range\", file /usr/include/qt4/QtCore/qlist.h, line 473") at global/qglobal.cpp:2276
#9  0x00007f2c4b21cc1f in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7f2c4b389298 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0x7fffc22469c8) at global/qglobal.cpp:2322
#10 0x00007f2c4b21cdc4 in qFatal (msg=<optimized out>) at global/qglobal.cpp:2505
#11 0x00000000004451db in QList<KTp::Presence>::operator[] (this=0xba3850, i=-1) at /usr/include/qt4/QtCore/qlist.h:473
#12 0x0000000000444251 in PresenceModel::data (this=0xba3840, index=..., role=0) at /opt/telepathy/ktp-contact-list/presence-model.cpp:58
#13 0x000000000043b856 in PresenceModelExtended::data (this=0xa8e2e0, index=..., role=0) at /opt/telepathy/ktp-contact-list/global-presence-chooser.cpp:114
#14 0x00007f2c49b31362 in QComboBoxPrivate::itemText (this=0xbee410, index=<optimized out>) at widgets/qcombobox.cpp:1287
#15 0x00007f2c49b32986 in QComboBox::currentText (this=<optimized out>) at widgets/qcombobox.cpp:2063
#16 0x00007f2c49b32a27 in QComboBox::initStyleOption (this=0xba4100, option=0x7fffc2246d90) at widgets/qcombobox.cpp:1133
#17 0x00007f2c49b32ba3 in QComboBox::paintEvent (this=0xba4100) at widgets/qcombobox.cpp:2806
#18 0x00007f2c497a15a6 in QWidget::event (this=0xba4100, event=0x7fffc2247e70) at kernel/qwidget.cpp:8507
#19 0x000000000043c93d in GlobalPresenceChooser::event (this=0xba4100, e=0x7fffc2247e70) at /opt/telepathy/ktp-contact-list/global-presence-chooser.cpp:293
#20 0x00007f2c49750ec4 in notify_helper (e=0x7fffc2247e70, receiver=0xba4100, this=0xaaa0a0) at kernel/qapplication.cpp:4555
#21 QApplicationPrivate::notify_helper (this=0xaaa0a0, receiver=0xba4100, e=0x7fffc2247e70) at kernel/qapplication.cpp:4527
#22 0x00007f2c49755d43 in QApplication::notify (this=0x7fffc224b260, receiver=0xba4100, e=0x7fffc2247e70) at kernel/qapplication.cpp:4416
#23 0x00007f2c4bff0ae6 in KApplication::notify (this=0x7fffc224b260, receiver=0xba4100, event=0x7fffc2247e70) at ../../kdeui/kernel/kapplication.cpp:311
#24 0x00007f2c4b32580c in QCoreApplication::notifyInternal (this=0x7fffc224b260, receiver=0xba4100, event=0x7fffc2247e70) at kernel/qcoreapplication.cpp:876
#25 0x00007f2c4c06d0e7 in sendEvent (event=<optimized out>, receiver=0xba4100) at /usr/include/qt4/QtCore/qcoreapplication.h:215
#26 eventFilter (event=<optimized out>, obj=0xba4100, this=0xba3bf0) at ../../kdeui/util/kpixmapsequenceoverlaypainter.cpp:256
#27 KPixmapSequenceOverlayPainter::eventFilter (this=0xba3bf0, obj=0xba4100, event=<optimized out>) at ../../kdeui/util/kpixmapsequenceoverlaypainter.cpp:249
#28 0x00007f2c4b325998 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0xba4100, event=0x7fffc2247e70) at kernel/qcoreapplication.cpp:986
#29 0x00007f2c49750e8f in notify_helper (e=0x7fffc2247e70, receiver=0xba4100, this=0xaaa0a0) at kernel/qapplication.cpp:4551
#30 QApplicationPrivate::notify_helper (this=0xaaa0a0, receiver=0xba4100, e=0x7fffc2247e70) at kernel/qapplication.cpp:4527
#31 0x00007f2c49755d43 in QApplication::notify (this=0x7fffc224b260, receiver=0xba4100, e=0x7fffc2247e70) at kernel/qapplication.cpp:4416
#32 0x00007f2c4bff0ae6 in KApplication::notify (this=0x7fffc224b260, receiver=0xba4100, event=0x7fffc2247e70) at ../../kdeui/kernel/kapplication.cpp:311
#33 0x00007f2c4b32580c in QCoreApplication::notifyInternal (this=0x7fffc224b260, receiver=0xba4100, event=0x7fffc2247e70) at kernel/qcoreapplication.cpp:876
#34 0x00007f2c4979d246 in sendSpontaneousEvent (event=0x7fffc2247e70, receiver=0xba4100) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#35 QWidgetPrivate::drawWidget (this=0xbee410, pdev=0xdabda0, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xc83240) at kernel/qwidget.cpp:5584
#36 0x00007f2c4979debf in QWidgetPrivate::paintSiblingsRecursive (this=0xc1ea50, pdev=0xdabda0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xc83240) at kernel/qwidget.cpp:5793
#37 0x00007f2c4979cf7c in QWidgetPrivate::drawWidget (this=0xc1ea50, pdev=0xdabda0, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0xc83240) at kernel/qwidget.cpp:5637
#38 0x00007f2c4979debf in QWidgetPrivate::paintSiblingsRecursive (this=0xbe5b70, pdev=0xdabda0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xc83240) at kernel/qwidget.cpp:5793
#39 0x00007f2c4979cf7c in QWidgetPrivate::drawWidget (this=0xbe5b70, pdev=0xdabda0, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0xc83240) at kernel/qwidget.cpp:5637
#40 0x00007f2c4996ae88 in QWidgetBackingStore::sync (this=0xc83240) at painting/qbackingstore.cpp:1373
#41 0x00007f2c49793fa0 in QWidgetPrivate::syncBackingStore (this=0xbe5b70) at kernel/qwidget.cpp:1890
#42 0x00007f2c497a1abc in QWidget::event (this=0xc45860, event=0xe827d0) at kernel/qwidget.cpp:8654
#43 0x00007f2c49b77dab in QMainWindow::event (this=0xc45860, event=0xe827d0) at widgets/qmainwindow.cpp:1478
#44 0x00007f2c49750ec4 in notify_helper (e=0xe827d0, receiver=0xc45860, this=0xaaa0a0) at kernel/qapplication.cpp:4555
#45 QApplicationPrivate::notify_helper (this=0xaaa0a0, receiver=0xc45860, e=0xe827d0) at kernel/qapplication.cpp:4527
#46 0x00007f2c49755d43 in QApplication::notify (this=0x7fffc224b260, receiver=0xc45860, e=0xe827d0) at kernel/qapplication.cpp:4416
#47 0x00007f2c4bff0ae6 in KApplication::notify (this=0x7fffc224b260, receiver=0xc45860, event=0xe827d0) at ../../kdeui/kernel/kapplication.cpp:311
#48 0x00007f2c4b32580c in QCoreApplication::notifyInternal (this=0x7fffc224b260, receiver=0xc45860, event=0xe827d0) at kernel/qcoreapplication.cpp:876
#49 0x00007f2c4b3295da in sendEvent (event=0xe827d0, receiver=0xc45860) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#50 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xa65ff0) at kernel/qcoreapplication.cpp:1500
#51 0x00007f2c4b354963 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#52 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#53 0x00007f2c462050cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#54 0x00007f2c462058c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#55 0x00007f2c46205a99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#56 0x00007f2c4b354d8f in QEventDispatcherGlib::processEvents (this=0xa674b0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#57 0x00007f2c497f54de in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#58 0x00007f2c4b3245f2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#59 0x00007f2c4b324847 in QEventLoop::exec (this=0x7fffc2249700, flags=...) at kernel/qeventloop.cpp:204
#60 0x00007f2c49c1d716 in QDialog::exec (this=0x15fd160) at dialogs/qdialog.cpp:552
#61 0x000000000043c9e1 in GlobalPresenceChooser::onCurrentIndexChanged (this=0xba4100, index=9) at /opt/telepathy/ktp-contact-list/global-presence-chooser.cpp:301
#62 0x000000000043d77d in GlobalPresenceChooser::qt_static_metacall (_o=0xba4100, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffc2249bc0) at /opt/telepathy/ktp-contact-list/build/moc_global-presence-chooser.cpp:54
#63 0x00007f2c4b339bf1 in QMetaObject::activate (sender=0xba4100, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffc2249bc0) at kernel/qobject.cpp:3547
#64 0x00007f2c49b352d1 in QComboBox::activated (this=<optimized out>, _t1=9) at .moc/release-shared/moc_qcombobox.cpp:288
#65 0x00007f2c49b35352 in QComboBoxPrivate::emitActivated (this=<optimized out>, index=...) at widgets/qcombobox.cpp:1261
#66 0x00007f2c49b36417 in QComboBoxPrivate::_q_itemSelected (this=0xbee410, item=...) at widgets/qcombobox.cpp:1252
#67 0x00007f2c4b339bf1 in QMetaObject::activate (sender=0x15e0310, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffc2249d70) at kernel/qobject.cpp:3547
#68 0x00007f2c49ddd1c2 in QComboBoxPrivateContainer::itemSelected (this=<optimized out>, _t1=<optimized out>) at .moc/release-shared/moc_qcombobox_p.cpp:253
#69 0x00007f2c49b308ca in QComboBoxPrivateContainer::eventFilter (this=0x15e0310, o=0x1559040, e=0x7fffc224a550) at widgets/qcombobox.cpp:691
#70 0x00007f2c4b325998 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x1559040, event=0x7fffc224a550) at kernel/qcoreapplication.cpp:986
#71 0x00007f2c49750e8f in notify_helper (e=0x7fffc224a550, receiver=0x1559040, this=0xaaa0a0) at kernel/qapplication.cpp:4551
#72 QApplicationPrivate::notify_helper (this=0xaaa0a0, receiver=0x1559040, e=0x7fffc224a550) at kernel/qapplication.cpp:4527
#73 0x00007f2c49756613 in QApplication::notify (this=<optimized out>, receiver=0x1559040, e=0x7fffc224a550) at kernel/qapplication.cpp:4098
#74 0x00007f2c4bff0ae6 in KApplication::notify (this=0x7fffc224b260, receiver=0x1559040, event=0x7fffc224a550) at ../../kdeui/kernel/kapplication.cpp:311
#75 0x00007f2c4b32580c in QCoreApplication::notifyInternal (this=0x7fffc224b260, receiver=0x1559040, event=0x7fffc224a550) at kernel/qcoreapplication.cpp:876
#76 0x00007f2c49751e92 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#77 QApplicationPrivate::sendMouseEvent (receiver=0x1559040, event=0x7fffc224a550, alienWidget=0x1559040, nativeWidget=0x15e0310, buttonDown=0x1559040, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3166
#78 0x00007f2c497ce901 in QETWidget::translateMouseEvent (this=0x15e0310, event=<optimized out>) at kernel/qapplication_x11.cpp:4449
#79 0x00007f2c497cd11a in QApplication::x11ProcessEvent (this=0x7fffc224b260, event=0x7fffc224ae10) at kernel/qapplication_x11.cpp:3641
#80 0x00007f2c497f5852 in x11EventSourceDispatch (s=0xa9ea30, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#81 0x00007f2c462050cf in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#82 0x00007f2c462058c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#83 0x00007f2c46205a99 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#84 0x00007f2c4b354d8f in QEventDispatcherGlib::processEvents (this=0xa674b0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#85 0x00007f2c497f54de in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#86 0x00007f2c4b3245f2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#87 0x00007f2c4b324847 in QEventLoop::exec (this=0x7fffc224b1e0, flags=...) at kernel/qeventloop.cpp:204
#88 0x00007f2c4b3298d7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#89 0x00000000004365a9 in main (argc=1, argv=0x7fffc224b528) at /opt/telepathy/ktp-contact-list/main.cpp:62

Reported using DrKonqi
Comment 1 David Edmundson 2012-01-19 01:34:05 UTC
"The crash can be reproduced every time."

Can this crash actually be reproduced every time (I can't, I may be missing some steps)
Comment 2 Daniele E. Domenichelli 2012-01-19 09:53:24 UTC
It can be reproduced every time here...
Steps to reproduce

- Open contact list
- Click on "Available" and type "Test"
- Hit enter
- Click on the dropdown menu and choose "Available" again
- Click on the dropdown menu and choose "Configure Custom Preferences"
- Select "Test"
- Click on "Remove Presence"
Comment 3 Dominik Cermak 2012-01-19 10:58:10 UTC
Just tried multiple times with your steps and no crash for me. Strange.
Comment 4 David Edmundson 2012-01-19 12:48:30 UTC
Ok, well it's an array out of bounds exception in PresenceModel::data() should be very easy to fix here.

Though would still be nice to see why someone is calling going out of bounds. Will commit a patch that checks, and then could people re-test.
Comment 5 David Edmundson 2012-01-19 12:49:16 UTC
Git commit 0f8fc440c2533716bfc51ed1c65615adf191c889 by David Edmundson.
Committed on 19/01/2012 at 13:47.
Pushed by davidedmundson into branch 'master'.

Check index validity in PresenceModel::data()

M  +7    -0    presence-model.cpp

http://commits.kde.org/telepathy-contact-list/0f8fc440c2533716bfc51ed1c65615adf191c889
Comment 6 Daniele E. Domenichelli 2012-01-19 18:37:38 UTC
I can confirm that the fix works, thanks