Bug 299532

Summary: Telepathy contact list crashed when setting status to offline
Product: [Unmaintained] telepathy Reporter: Miguel Tadeu <mtadeunet>
Component: contactlistAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: kde
Priority: NOR    
Version: 0.3.0   
Target Milestone: 0.4.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Miguel Tadeu 2012-05-06 23:47:04 UTC
Application: ktp-contactlist (0.3)
KDE Platform Version: 4.8.2 (4.8.2)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-24-generic-pae i686
Distribution: Ubuntu 12.04 LTS

-- Information about the crash:
After doing som talking, I just set the status to offline
...

-- Backtrace:
Application: KDE Telepathy Contact List (ktp-contactlist), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb49d1740 (LWP 5138))]

Thread 2 (Thread 0xb2154b40 (LWP 5139)):
#0  0xb77ac424 in __kernel_vsyscall ()
#1  0xb58ce380 in __GI___poll (fds=0xb1802278, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb500aa3b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb4ffd06e in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb4ffd1c1 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb6a4c8e7 in QEventDispatcherGlib::processEvents (this=0xb1800468, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0xb6a1850d in QEventLoop::processEvents (this=0xb2154240, flags=...) at kernel/qeventloop.cpp:149
#7  0xb6a187a9 in QEventLoop::exec (this=0xb2154240, flags=...) at kernel/qeventloop.cpp:204
#8  0xb690194c in QThread::exec (this=0x8b5ec90) at thread/qthread.cpp:501
#9  0xb69f5b5d in QInotifyFileSystemWatcherEngine::run (this=0x8b5ec90) at io/qfilesystemwatcher_inotify.cpp:248
#10 0xb6904de0 in QThreadPrivate::start (arg=0x8b5ec90) at thread/qthread_unix.cpp:298
#11 0xb50dad4c in start_thread (arg=0xb2154b40) at pthread_create.c:308
#12 0xb58dcace in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb49d1740 (LWP 5138)):
[KCrash Handler]
#7  0xb74c29da in Tp::ContactManager::connection() const () from /usr/lib/libtelepathy-qt4.so.2
#8  0xb72b4cfc in ContactModelItem::audioCallCapability() const () from /usr/lib/libktpmodelsprivate.so.0
#9  0xb72b5390 in ContactModelItem::data(int) const () from /usr/lib/libktpmodelsprivate.so.0
#10 0xb72b8c39 in ProxyTreeNode::data(int) const () from /usr/lib/libktpmodelsprivate.so.0
#11 0xb72b65a9 in GroupsModel::data(QModelIndex const&, int) const () from /usr/lib/libktpmodelsprivate.so.0
#12 0xb61faa97 in QSortFilterProxyModel::data (this=0x8afdc58, index=..., role=66) at itemviews/qsortfilterproxymodel.cpp:1718
#13 0x0806a17f in data (arole=<optimized out>, this=0x90291e0) at /usr/include/qt4/QtCore/qabstractitemmodel.h:402
#14 StartChannelContactOverlay::checkIndex (this=0x8aff098, index=...) at /build/buildd/ktp-contact-list-0.3.1/contact-overlays.cpp:124
#15 0x0806c155 in AbstractWidgetDelegateOverlay::slotEntered (this=0x8aff098, index=...) at /build/buildd/ktp-contact-list-0.3.1/contact-delegate-overlay.cpp:182
#16 0x0806c1cf in HoverButtonDelegateOverlay::slotEntered (this=0x8aff098, index=...) at /build/buildd/ktp-contact-list-0.3.1/contact-delegate-overlay.cpp:304
#17 0xb6a306b1 in QMetaObject::activate (sender=0x8ae0ac0, m=0xb653bb7c, local_signal_index=4, argv=0xbfcd52e8) at kernel/qobject.cpp:3547
#18 0xb6169a75 in QAbstractItemView::entered (this=0x8ae0ac0, _t1=...) at .moc/release-shared/moc_qabstractitemview.cpp:369
#19 0xb6169c10 in QAbstractItemViewPrivate::checkMouseMove (this=0x8ae0e60, index=...) at itemviews/qabstractitemview.cpp:172
#20 0xb6169e79 in checkMouseMove (pos=..., this=0x8ae0e60) at ../../include/QtGui/private/../../../src/gui/itemviews/qabstractitemview_p.h:156
#21 QAbstractItemView::verticalScrollbarValueChanged (this=0x8ae0ac0, value=2) at itemviews/qabstractitemview.cpp:2664
#22 0xb616a34b in qt_static_metacall (_a=0xbfcd54c8, _id=26, _o=0x8ae0ac0, _c=<optimized out>) at .moc/release-shared/moc_qabstractitemview.cpp:223
#23 QAbstractItemView::qt_static_metacall (_o=0x8ae0ac0, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbfcd54c8) at .moc/release-shared/moc_qabstractitemview.cpp:191
#24 0xb6a306b1 in QMetaObject::activate (sender=0x8ae05c8, m=0xb6542900, local_signal_index=0, argv=0xbfcd54c8) at kernel/qobject.cpp:3547
#25 0xb62eef85 in QAbstractSlider::valueChanged (this=0x8ae05c8, _t1=2) at .moc/release-shared/moc_qabstractslider.cpp:196
#26 0xb5fe5fd5 in QAbstractSlider::setValue (this=0x8ae05c8, value=2) at widgets/qabstractslider.cpp:543
#27 0xb5fe60af in QAbstractSlider::setRange (this=0x8ae05c8, min=0, max=2) at widgets/qabstractslider.cpp:252
#28 0xb61b1837 in QTreeViewPrivate::updateScrollBars (this=0x8ae0e60) at itemviews/qtreeview.cpp:3513
#29 0xb61b1d48 in QTreeView::updateGeometries (this=0x8ae0ac0) at itemviews/qtreeview.cpp:2721
#30 0xb6168074 in QAbstractItemView::doItemsLayout (this=0x8ae0ac0) at itemviews/qabstractitemview.cpp:1164
#31 0xb61b95b8 in QTreeView::doItemsLayout (this=0x8ae0ac0) at itemviews/qtreeview.cpp:2064
#32 0xb61b1ae8 in QTreeViewPrivate::updateScrollBars (this=0x8ae0e60) at itemviews/qtreeview.cpp:3491
#33 0xb61bc688 in QTreeView::scrollTo (this=0x8ae0ac0, index=..., hint=QAbstractItemView::EnsureVisible) at itemviews/qtreeview.cpp:1089
#34 0xb616eb5f in QAbstractItemView::currentChanged (this=0x8ae0ac0, current=..., previous=...) at itemviews/qabstractitemview.cpp:3505
#35 0xb61ae9aa in QTreeView::currentChanged (this=0x8ae0ac0, current=..., previous=...) at itemviews/qtreeview.cpp:3750
#36 0xb616a2d0 in qt_static_metacall (_a=0xbfcd5924, _id=20, _o=0x8ae0ac0, _c=<optimized out>) at .moc/release-shared/moc_qabstractitemview.cpp:217
#37 QAbstractItemView::qt_static_metacall (_o=0x8ae0ac0, _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0xbfcd5924) at .moc/release-shared/moc_qabstractitemview.cpp:191
#38 0xb6a306b1 in QMetaObject::activate (sender=0x8afeb40, m=0xb653c868, local_signal_index=1, argv=0xbfcd5924) at kernel/qobject.cpp:3547
#39 0xb61c762d in QItemSelectionModel::currentChanged (this=0x8afeb40, _t1=..., _t2=...) at .moc/release-shared/moc_qitemselectionmodel.cpp:173
#40 0xb61c77ac in QItemSelectionModel::setCurrentIndex (this=0x8afeb40, index=..., command=...) at itemviews/qitemselectionmodel.cpp:1175
#41 0xb61653c7 in QAbstractItemView::setCurrentIndex (this=0x8ae0ac0, index=...) at itemviews/qabstractitemview.cpp:1022
#42 0xb617229b in QAbstractItemView::rowsAboutToBeRemoved (this=0x8ae0ac0, parent=..., start=1, end=1) at itemviews/qabstractitemview.cpp:3256
#43 0xb61b4a61 in QTreeView::rowsAboutToBeRemoved (this=0x8ae0ac0, parent=..., start=1, end=1) at itemviews/qtreeview.cpp:2527
#44 0xb616a294 in qt_static_metacall (_a=0xbfcd5c60, _id=18, _o=0x8ae0ac0, _c=<optimized out>) at .moc/release-shared/moc_qabstractitemview.cpp:215
#45 QAbstractItemView::qt_static_metacall (_o=0x8ae0ac0, _c=QMetaObject::InvokeMetaMethod, _id=18, _a=0xbfcd5c60) at .moc/release-shared/moc_qabstractitemview.cpp:191
#46 0xb6a306b1 in QMetaObject::activate (sender=0x8afdc58, m=0xb6b772b8, local_signal_index=6, argv=0xbfcd5c60) at kernel/qobject.cpp:3547
#47 0xb6a82455 in QAbstractItemModel::rowsAboutToBeRemoved (this=0x8afdc58, _t1=..., _t2=1, _t3=1) at .moc/release-shared/moc_qabstractitemmodel.cpp:204
#48 0xb6a1314c in QAbstractItemModel::beginRemoveRows (this=0x8afdc58, parent=..., first=1, last=1) at kernel/qabstractitemmodel.cpp:2470
#49 0xb61fce8c in QSortFilterProxyModelPrivate::remove_proxy_interval (this=0x8afe028, source_to_proxy=..., proxy_to_source=..., proxy_start=1, proxy_end=1, proxy_parent=..., orient=Qt::Vertical, emit_signal=true) at itemviews/qsortfilterproxymodel.cpp:557
#50 0xb6201ed8 in QSortFilterProxyModelPrivate::remove_source_items (this=0x8afe028, source_to_proxy=..., proxy_to_source=..., source_items=..., source_parent=..., orient=Qt::Vertical, emit_signal=true) at itemviews/qsortfilterproxymodel.cpp:539
#51 0xb6203a9a in QSortFilterProxyModelPrivate::source_items_about_to_be_removed (this=0x8afe028, source_parent=..., start=122, end=122, orient=Qt::Vertical) at itemviews/qsortfilterproxymodel.cpp:840
#52 0xb6203baa in QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeRemoved (this=0x8afe028, source_parent=..., start=122, end=122) at itemviews/qsortfilterproxymodel.cpp:1290
#53 0xb6a306b1 in QMetaObject::activate (sender=0x8afd4d0, m=0xb6b772b8, local_signal_index=6, argv=0xbfcd5ee0) at kernel/qobject.cpp:3547
#54 0xb6a82455 in QAbstractItemModel::rowsAboutToBeRemoved (this=0x8afd4d0, _t1=..., _t2=122, _t3=122) at .moc/release-shared/moc_qabstractitemmodel.cpp:204
#55 0xb6a1314c in QAbstractItemModel::beginRemoveRows (this=0x8afd4d0, parent=..., first=122, last=122) at kernel/qabstractitemmodel.cpp:2470
#56 0xb72b6ad5 in GroupsModel::onItemsRemoved(TreeNode*, int, int) () from /usr/lib/libktpmodelsprivate.so.0
#57 0xb72acd33 in ?? () from /usr/lib/libktpmodelsprivate.so.0
#58 0xb6a306b1 in QMetaObject::activate (sender=0x8afdde8, m=0xb72bfe64, local_signal_index=2, argv=0xbfcd60b0) at kernel/qobject.cpp:3547
#59 0xb72b8f75 in TreeNode::childrenRemoved(TreeNode*, int, int) () from /usr/lib/libktpmodelsprivate.so.0
#60 0xb72b9013 in ?? () from /usr/lib/libktpmodelsprivate.so.0
#61 0xb6a306b1 in QMetaObject::activate (sender=0x8f8f000, m=0xb72bfe64, local_signal_index=2, argv=0xbfcd61b0) at kernel/qobject.cpp:3547
#62 0xb72b8f75 in TreeNode::childrenRemoved(TreeNode*, int, int) () from /usr/lib/libktpmodelsprivate.so.0
#63 0xb72b9013 in ?? () from /usr/lib/libktpmodelsprivate.so.0
#64 0xb6a306b1 in QMetaObject::activate (sender=0x902a578, m=0xb72bfe64, local_signal_index=2, argv=0xbfcd62b0) at kernel/qobject.cpp:3547
#65 0xb72b8f75 in TreeNode::childrenRemoved(TreeNode*, int, int) () from /usr/lib/libktpmodelsprivate.so.0
#66 0xb72b8cd9 in ProxyTreeNode::onSourceNodeRemoved() () from /usr/lib/libktpmodelsprivate.so.0
#67 0xb72acf80 in ?? () from /usr/lib/libktpmodelsprivate.so.0
#68 0xb6a306b1 in QMetaObject::activate (sender=0x902fe98, m=0x80960d8, local_signal_index=0, argv=0xbfcd63d8) at kernel/qobject.cpp:3547
#69 0xb6a31075 in QObject::destroyed (this=0x902fe98, _t1=0x902fe98) at .moc/release-shared/moc_qobject.cpp:149
#70 0xb6a33f8f in QObject::~QObject (this=0x902fe98, __in_chrg=<optimized out>) at kernel/qobject.cpp:844
#71 0xb72b93e2 in TreeNode::~TreeNode() () from /usr/lib/libktpmodelsprivate.so.0
#72 0xb72b45d8 in ContactModelItem::~ContactModelItem() () from /usr/lib/libktpmodelsprivate.so.0
#73 0xb72b4612 in ContactModelItem::~ContactModelItem() () from /usr/lib/libktpmodelsprivate.so.0
#74 0xb6a2dd03 in qDeleteInEventHandler (o=0x902fe98) at kernel/qobject.cpp:4277
#75 0xb6a34ca8 in QObject::event (this=0x902fe98, e=0x908f3a8) at kernel/qobject.cpp:1176
#76 0xb5bb6ed4 in notify_helper (e=0x908f3a8, receiver=0x902fe98, this=0x89f7dc0) at kernel/qapplication.cpp:4559
#77 QApplicationPrivate::notify_helper (this=0x89f7dc0, receiver=0x902fe98, e=0x908f3a8) at kernel/qapplication.cpp:4531
#78 0xb5bbc30d in QApplication::notify (this=0x908f3a8, receiver=0x902fe98, e=0x908f3a8) at kernel/qapplication.cpp:4288
#79 0xb704db21 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#80 0xb6a1997e in QCoreApplication::notifyInternal (this=0xbfcd6cb8, receiver=0x902fe98, event=0x908f3a8) at kernel/qcoreapplication.cpp:876
#81 0xb6a1dad8 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#82 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x89d1c18) at kernel/qcoreapplication.cpp:1500
#83 0xb6a1de0c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1393
#84 0xb6a4c494 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#85 postEventSourceDispatch (s=0x89f78a0) at kernel/qeventdispatcher_glib.cpp:279
#86 0xb4ffccda in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#87 0xb4ffd0e5 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#88 0xb4ffd1c1 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#89 0xb6a4c887 in QEventDispatcherGlib::processEvents (this=0x89d2798, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#90 0xb5c6faaa in QGuiEventDispatcherGlib::processEvents (this=0x89d2798, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#91 0xb6a1850d in QEventLoop::processEvents (this=0xbfcd6c14, flags=...) at kernel/qeventloop.cpp:149
#92 0xb6a187a9 in QEventLoop::exec (this=0xbfcd6c14, flags=...) at kernel/qeventloop.cpp:204
#93 0xb6a1deba in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#94 0xb5bb4a74 in QApplication::exec () at kernel/qapplication.cpp:3820
#95 0x0805d2b7 in main (argc=<error reading variable: Cannot access memory at address 0x1>, argv=<error reading variable: Cannot access memory at address 0x5>) at /build/buildd/ktp-contact-list-0.3.1/main.cpp:62

Reported using DrKonqi
Comment 1 David Edmundson 2012-05-06 23:51:18 UTC
oops, I can see this:

ContactModelItem::audioCallCapability,videoCallCapability  and fileTransferCapability
all use the connection() without checking the return value. Patching now.
Comment 2 Martin Klapetek 2012-05-12 13:12:47 UTC
Git commit 4172068925a04d030701d26f3c7e46d9a6a94aaf by Martin Klapetek.
Committed on 12/05/2012 at 15:09.
Pushed by mklapetek into branch 'master'.

Fix null pointer crash

Reviewed-by: David Edmundson

M  +21   -9    KTp/Models/contact-model-item.cpp

http://commits.kde.org/telepathy-common-internals/4172068925a04d030701d26f3c7e46d9a6a94aaf