Bug 359571 - Plasma (and ktp-contact-list) crashed when I block new contact invitation on jabber (telepathy-gabble)
Summary: Plasma (and ktp-contact-list) crashed when I block new contact invitation on ...
Status: RESOLVED WORKSFORME
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2016-02-19 12:05 UTC by Lukáš Karas
Modified: 2018-12-02 03:45 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch that avoids access to list with negative index (680 bytes, patch)
2016-03-29 05:57 UTC, Lukáš Karas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukáš Karas 2016-02-19 12:05:01 UTC
Application: plasmashell (5.5.4)
 (Compiled from sources)
Qt Version: 5.5.1
Operating System: Linux 4.4.1 x86_64
Distribution: Ubuntu Xenial Xerus (development branch)

-- Information about the crash:
- What I was doing when the application crashed:

When I loged in to my jabber account (telepathy-gabble), plasma notify my that someone wants to add me to his contact list. It was spam, so I decided block it. Then, plasmashell and ktp-contact-list crashed. It happens often and I have to block same accounts after each login.

I compiled KDE from source code just days before. 
kpeople head : dbf8ba2fdebf3829a816abc847fc064edc106f13
ktp-common-internals head: 2a955003f509900332fb950d67e06309bb8bea26
plasma-workspace head: a62aae16e9e758a5fcf75f8a7704a03608de4dfc

The crash can be reproduced sometimes.

-- Backtrace:
Application: Plasma (plasmashell), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f6f37cbc900 (LWP 12504))]

Thread 10 (Thread 0x7f6f22b23700 (LWP 12506)):
#0  0x00007f6f320f89ed in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f363d3c62 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f6f363d58d7 in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f6f24c6d539 in QXcbEventReader::run (this=0x14d7a40) at qxcbconnection.cpp:1230
#4  0x00007f6f327ee7fe in QThreadPrivate::start (arg=0x14d7a40) at thread/qthread_unix.cpp:331
#5  0x00007f6f318da66a in start_thread (arg=0x7f6f22b23700) at pthread_create.c:333
#6  0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 9 (Thread 0x7f6f1bdf9700 (LWP 12507)):
#0  0x00007f6f320f45ad in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f2edbe700 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f2ed7ae24 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f2ed7b2e0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f6f2ed7b44c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6f32a25a5b in QEventDispatcherGlib::processEvents (this=0x7f6f140008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#6  0x00007f6f329ccd6a in QEventLoop::exec (this=this@entry=0x7f6f1bdf8ca0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#7  0x00007f6f327e9854 in QThread::exec (this=this@entry=0x15cd980) at thread/qthread.cpp:503
#8  0x00007f6f351eec85 in QQmlThreadPrivate::run (this=0x15cd980) at qml/ftw/qqmlthread.cpp:141
#9  0x00007f6f327ee7fe in QThreadPrivate::start (arg=0x15cd980) at thread/qthread_unix.cpp:331
#10 0x00007f6f318da66a in start_thread (arg=0x7f6f1bdf9700) at pthread_create.c:333
#11 0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 8 (Thread 0x7f6f10a35700 (LWP 12508)):
#0  0x00007f6f320f45ad in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f2edbe700 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f2ed7ae24 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f2ed7b2e0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f6f2ed7b44c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6f32a25a5b in QEventDispatcherGlib::processEvents (this=0x7f6f0c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#6  0x00007f6f329ccd6a in QEventLoop::exec (this=this@entry=0x7f6f10a34ca0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#7  0x00007f6f327e9854 in QThread::exec (this=this@entry=0x18d32d0) at thread/qthread.cpp:503
#8  0x00007f6f351eec85 in QQmlThreadPrivate::run (this=0x18d32d0) at qml/ftw/qqmlthread.cpp:141
#9  0x00007f6f327ee7fe in QThreadPrivate::start (arg=0x18d32d0) at thread/qthread_unix.cpp:331
#10 0x00007f6f318da66a in start_thread (arg=0x7f6f10a35700) at pthread_create.c:333
#11 0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7f6f0a73c700 (LWP 12509)):
#0  0x00007f6f320f89ed in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f2ed7b33c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f2ed7b44c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f32a25a5b in QEventDispatcherGlib::processEvents (this=0x7f6f040008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#4  0x00007f6f329ccd6a in QEventLoop::exec (this=this@entry=0x7f6f0a73bca0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007f6f327e9854 in QThread::exec (this=this@entry=0x19f4c30) at thread/qthread.cpp:503
#6  0x00007f6f351eec85 in QQmlThreadPrivate::run (this=0x19f4c30) at qml/ftw/qqmlthread.cpp:141
#7  0x00007f6f327ee7fe in QThreadPrivate::start (arg=0x19f4c30) at thread/qthread_unix.cpp:331
#8  0x00007f6f318da66a in start_thread (arg=0x7f6f0a73c700) at pthread_create.c:333
#9  0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7f6f08edc700 (LWP 12510)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f6f37705bd4 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#2  0x00007f6f37705c19 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5
#3  0x00007f6f318da66a in start_thread (arg=0x7f6f08edc700) at pthread_create.c:333
#4  0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f6e8234e700 (LWP 12515)):
#0  0x00007f6f2ed7acfa in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f6f2ed7b2e0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f2ed7b44c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f32a25a5b in QEventDispatcherGlib::processEvents (this=0x7f6e7c0ac390, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#4  0x00007f6f329ccd6a in QEventLoop::exec (this=this@entry=0x7f6e8234dc50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007f6f327e9854 in QThread::exec (this=this@entry=0x1a93bd0) at thread/qthread.cpp:503
#6  0x00007f6f35bd9e46 in QQuickPixmapReader::run (this=0x1a93bd0) at util/qquickpixmapcache.cpp:817
#7  0x00007f6f327ee7fe in QThreadPrivate::start (arg=0x1a93bd0) at thread/qthread_unix.cpp:331
#8  0x00007f6f318da66a in start_thread (arg=0x7f6e8234e700) at pthread_create.c:333
#9  0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f6e81b4d700 (LWP 12520)):
#0  0x00007f6f320f89ed in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f2ed7b33c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f2ed7b44c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f32a25a5b in QEventDispatcherGlib::processEvents (this=0x7f6e7400cad0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#4  0x00007f6f329ccd6a in QEventLoop::exec (this=this@entry=0x7f6e81b4ccc0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007f6f327e9854 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#6  0x00007f6f327ee7fe in QThreadPrivate::start (arg=0x369ec60) at thread/qthread_unix.cpp:331
#7  0x00007f6f318da66a in start_thread (arg=0x7f6e81b4d700) at pthread_create.c:333
#8  0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f6e79945700 (LWP 12521)):
#0  0x00007f6f320f45ad in read () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f2edbe700 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f2ed7ae24 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f2ed7b2e0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f6f2ed7b44c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6f32a25a5b in QEventDispatcherGlib::processEvents (this=0x7f6e700008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#6  0x00007f6f329ccd6a in QEventLoop::exec (this=this@entry=0x7f6e79944ca0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#7  0x00007f6f327e9854 in QThread::exec (this=this@entry=0x372f100) at thread/qthread.cpp:503
#8  0x00007f6e80179035 in QQuickXmlQueryEngine::run (this=0x372f100) at qqmlxmllistmodel.cpp:317
#9  0x00007f6f327ee7fe in QThreadPrivate::start (arg=0x372f100) at thread/qthread_unix.cpp:331
#10 0x00007f6f318da66a in start_thread (arg=0x7f6e79945700) at pthread_create.c:333
#11 0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f6e66ca0700 (LWP 12531)):
#0  0x00007f6f320f89ed in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f6f2ed7b33c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f6f2ed7b44c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6f32a25a5b in QEventDispatcherGlib::processEvents (this=0x7f6e600008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:420
#4  0x00007f6f329ccd6a in QEventLoop::exec (this=this@entry=0x7f6e66c9fc70, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007f6f327e9854 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:503
#6  0x00007f6e68f3c83e in KCupsConnection::run (this=0x3e83a50) at /media/karry/data/src/print-manager/libkcups/KCupsConnection.cpp:304
#7  0x00007f6f327ee7fe in QThreadPrivate::start (arg=0x3e83a50) at thread/qthread_unix.cpp:331
#8  0x00007f6f318da66a in start_thread (arg=0x7f6e66ca0700) at pthread_create.c:333
#9  0x00007f6f3210401d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f6f37cbc900 (LWP 12504)):
[KCrash Handler]
#6  0x00007f6f32032227 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#7  0x00007f6f32033e8a in __GI_abort () at abort.c:89
#8  0x00007f6f327dbfb1 in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1578
#9  QMessageLogger::fatal (this=this@entry=0x7ffce85900c0, msg=msg@entry=0x7f6f32a99008 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:781
#10 0x00007f6f327d7181 in qt_assert_x (where=<optimized out>, what=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:2974
#11 0x00007f6e640e031d in QList<KPeople::MetaContact>::operator[] (this=0x4e164d8, i=-1) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:518
#12 0x00007f6e640dda95 in KPeople::PersonsModelPrivate::onContactRemoved (this=0x4e164b0, contactUri=...) at /media/karry/data/src/kpeople/src/personsmodel.cpp:346
#13 0x00007f6e640e3323 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QString const&>, void, void (KPeople::PersonsModelPrivate::*)(QString const&)>::call (f=(void (KPeople::PersonsModelPrivate::*)(KPeople::PersonsModelPrivate * const, const QString &)) 0x7f6e640dda0a <KPeople::PersonsModelPrivate::onContactRemoved(QString const&)>, o=0x4e164b0, arg=0x7ffce8590390) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:501
#14 0x00007f6e640e2da4 in QtPrivate::FunctionPointer<void (KPeople::PersonsModelPrivate::*)(QString const&)>::call<QtPrivate::List<QString const&>, void> (f=(void (KPeople::PersonsModelPrivate::*)(KPeople::PersonsModelPrivate * const, const QString &)) 0x7f6e640dda0a <KPeople::PersonsModelPrivate::onContactRemoved(QString const&)>, o=0x4e164b0, arg=0x7ffce8590390) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:520
#15 0x00007f6e640e269f in QtPrivate::QSlotObject<void (KPeople::PersonsModelPrivate::*)(QString const&), QtPrivate::List<QString const&>, void>::impl (which=1, this_=0x4c90590, r=0x4e164b0, a=0x7ffce8590390, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:143
#16 0x00007f6f329fde0f in QtPrivate::QSlotObjectBase::call (a=0x7ffce8590390, r=0x4e164b0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#17 QMetaObject::activate (sender=0x4e0cbd0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3698
#18 0x00007f6e5f506f3e in KPeople::AllContactsMonitor::contactRemoved (this=0x4e0cbd0, _t1=...) at /media/karry/data/src/kpeople/myBuild/src/backends/moc_allcontactsmonitor.cpp:184
#19 0x00007f6e65645c1a in KTpAllContacts::onAllKnownContactsChanged (this=0x4e0cbd0, contactsAdded=..., contactsRemoved=...) at /media/karry/data/src/ktp-common-internals/kpeople/datasourceplugin/im-persons-data-source.cpp:281
#20 0x00007f6e65646872 in KTpAllContacts::qt_static_metacall (_o=0x4e0cbd0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7ffce8590640) at /media/karry/data/src/ktp-common-internals/myBuild/kpeople/datasourceplugin/im-persons-data-source.moc:105
#21 0x00007f6f329fdf8a in QMetaObject::activate (sender=0x56b6130, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3713
#22 0x00007f6e645a8a08 in KTp::GlobalContactManager::allKnownContactsChanged (this=0x56b6130, _t1=..., _t2=...) at /media/karry/data/src/ktp-common-internals/myBuild/KTp/moc_global-contact-manager.cpp:178
#23 0x00007f6e645a86f6 in KTp::GlobalContactManager::qt_static_metacall (_o=0x56b6130, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffce85907d0) at /media/karry/data/src/ktp-common-internals/myBuild/KTp/moc_global-contact-manager.cpp:111
#24 0x00007f6f329fdf8a in QMetaObject::activate (sender=0x5150490, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3713
#25 0x00007f6e5fb30b2f in Tp::ContactManager::allKnownContactsChanged(QSet<Tp::SharedPtr<Tp::Contact> > const&, QSet<Tp::SharedPtr<Tp::Contact> > const&, Tp::Channel::GroupMemberChangeDetails const&) () from /usr/lib/x86_64-linux-gnu/libtelepathy-qt5.so.0
#26 0x00007f6e5fb4551e in ?? () from /usr/lib/x86_64-linux-gnu/libtelepathy-qt5.so.0
#27 0x00007f6e5fb4ffd2 in ?? () from /usr/lib/x86_64-linux-gnu/libtelepathy-qt5.so.0
#28 0x00007f6f329fdf8a in QMetaObject::activate (sender=0x71aba30, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3713
#29 0x00007f6e5fc05d0f in Tp::PendingOperation::finished(Tp::PendingOperation*) () from /usr/lib/x86_64-linux-gnu/libtelepathy-qt5.so.0
#30 0x00007f6e5fc07430 in ?? () from /usr/lib/x86_64-linux-gnu/libtelepathy-qt5.so.0
#31 0x00007f6f329fee61 in QObject::event (this=0x71aba30, e=<optimized out>) at kernel/qobject.cpp:1239
#32 0x00007f6f334daffc in QApplicationPrivate::notify_helper (this=this@entry=0x14c05a0, receiver=receiver@entry=0x71aba30, e=e@entry=0x614f2a0) at kernel/qapplication.cpp:3716
#33 0x00007f6f334e04b6 in QApplication::notify (this=0x7ffce8591350, receiver=0x71aba30, e=0x614f2a0) at kernel/qapplication.cpp:3499
#34 0x00007f6f329cf5ab in QCoreApplication::notifyInternal (this=0x7ffce8591350, receiver=0x71aba30, event=event@entry=0x614f2a0) at kernel/qcoreapplication.cpp:965
#35 0x00007f6f329d19a6 in QCoreApplication::sendEvent (event=0x614f2a0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#36 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x14b6600) at kernel/qcoreapplication.cpp:1593
#37 0x00007f6f329d1e88 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#38 0x00007f6f32a25633 in postEventSourceDispatch (s=0x14f9a90) at kernel/qeventdispatcher_glib.cpp:271
#39 0x00007f6f2ed7b147 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007f6f2ed7b3a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007f6f2ed7b44c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007f6f32a25a3f in QEventDispatcherGlib::processEvents (this=0x14f9b10, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#43 0x00007f6f329ccd6a in QEventLoop::exec (this=this@entry=0x7ffce85911e0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#44 0x00007f6f329d4e0c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#45 0x000000000047332d in main (argc=1, argv=0x7ffce8591498) at /media/karry/data/src/plasma-workspace/shell/main.cpp:158

Possible duplicates by query: bug 358762, bug 356148, bug 355943, bug 355096, bug 355033.

Reported using DrKonqi
Comment 1 Lukáš Karas 2016-03-29 05:55:55 UTC
I recompiled kpeople today and this bug still exists... 
kpeople head: a72809761419457b803e13ab91c1a1950b5f9ac8

I created simple patch that avoids `metacontacts[personRow]` access when `personRow` is < 0. 

diff --git a/src/personsmodel.cpp b/src/personsmodel.cpp
index 0c9fa13..13bdb50 100644
--- a/src/personsmodel.cpp
+++ b/src/personsmodel.cpp
@@ -343,6 +343,11 @@ void PersonsModelPrivate::onContactRemoved(const QString &contactUri)
 
     int personRow = personIndex[personUri].row();
 
+    if(personRow < 0){
+        qDebug() << "personRow: " << personRow << ", contactUri: " << contactUri << ", personUri: " << personUri;
+        removePerson(personUri);
+        return;
+    }
     MetaContact &mc = metacontacts[personRow];
     int contactPosition = mc.contactUris().indexOf(contactUri);
     q->beginRemoveRows(q->index(personRow, 0), contactPosition, contactPosition);

Console output when I remove spam contact:

personRow:  -1 , contactUri:  "ktp://gabble/jabber/ktp_2djabber_2dim_12?doofyntv6@swissjabber.org" , personUri:  "ktp://gabble/jabber/ktp_2djabber_2dim_12?doofyntv6@swissjabber.org"

It fixes these crashes but I don't know if this is correct place where it should be fixed...
Comment 2 Lukáš Karas 2016-03-29 05:57:55 UTC
Created attachment 98130 [details]
patch that avoids access to list with negative index
Comment 3 Lukáš Karas 2016-03-30 10:04:46 UTC
Another similar case in method PersonsModelPrivate::onContactAdded:

stacktrace:

Thread 1 (Thread 0x7fb0af99d8c0 (LWP 3044)):
[KCrash Handler]
#6  0x00007fb0a9cf3518 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#7  0x00007fb0a9cf50ea in __GI_abort () at abort.c:89
#8  0x00007fb0aa49cfb1 in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1578
#9  QMessageLogger::fatal (this=this@entry=0x7ffe47e02600, msg=msg@entry=0x7fb0aa75a028 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:781
#10 0x00007fb0aa498181 in qt_assert_x (where=<optimized out>, what=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:2974
#11 0x00007faff143d617 in QList<KPeople::MetaContact>::operator[] (this=0x5cd3c28, i=-1) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:518
#12 0x00007faff143a7da in KPeople::PersonsModelPrivate::onContactAdded (this=0x5cd3c00, contactUri=..., contact=...) at /media/karry/data/src/kpeople/src/personsmodel.cpp:305
#13 0x00007faff14406da in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<QString const&, QExplicitlySharedDataPointer<KPeople::AbstractContact> const&>, void, void (KPeople::PersonsModelPrivate::*)(QString const&, QExplicitlySharedDataPointer<KPeople::AbstractContact> const&)>::call (f=(void (KPeople::PersonsModelPrivate::*)(KPeople::PersonsModelPrivate * const, const QString &, const QExplicitlySharedDataPointer<KPeople::AbstractContact> &)) 0x7faff143a6fa <KPeople::PersonsModelPrivate::onContactAdded(QString const&, QExplicitlySharedDataPointer<KPeople::AbstractContact> const&)>, o=0x5cd3c00, arg=0x7ffe47e02910) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:501
#14 0x00007faff144021d in QtPrivate::FunctionPointer<void (KPeople::PersonsModelPrivate::*)(QString const&, QExplicitlySharedDataPointer<KPeople::AbstractContact> const&)>::call<QtPrivate::List<QString const&, QExplicitlySharedDataPointer<KPeople::AbstractContact> const&>, void> (f=(void (KPeople::PersonsModelPrivate::*)(KPeople::PersonsModelPrivate * const, const QString &, const QExplicitlySharedDataPointer<KPeople::AbstractContact> &)) 0x7faff143a6fa <KPeople::PersonsModelPrivate::onContactAdded(QString const&, QExplicitlySharedDataPointer<KPeople::AbstractContact> const&)>, o=0x5cd3c00, arg=0x7ffe47e02910) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:520
#15 0x00007faff143fcff in QtPrivate::QSlotObject<void (KPeople::PersonsModelPrivate::*)(QString const&, QExplicitlySharedDataPointer<KPeople::AbstractContact> const&), QtPrivate::List<QString const&, QExplicitlySharedDataPointer<KPeople::AbstractContact> const&>, void>::impl (which=1, this_=0x5ed76f0, r=0x5cd3c00, a=0x7ffe47e02910, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:143
#16 0x00007fb0aa6bee1f in QtPrivate::QSlotObjectBase::call (a=0x7ffe47e02910, r=0x5cd3c00, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#17 QMetaObject::activate (sender=0x71206c0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3698
#18 0x00007faff0f9eed0 in KPeople::AllContactsMonitor::contactAdded (this=0x71206c0, _t1=..., _t2=...) at /media/karry/data/src/kpeople/myBuild/src/backends/moc_allcontactsmonitor.cpp:177
#19 0x00007fafcc3ddf0b in KTpAllContacts::onAllKnownContactsChanged (this=0x71206c0, contactsAdded=..., contactsRemoved=...) at /media/karry/data/src/ktp-common-internals/kpeople/datasourceplugin/im-persons-data-source.cpp:302
#20 0x00007fafcc3de872 in KTpAllContacts::qt_static_metacall (_o=0x71206c0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7ffe47e02bc0) at /media/karry/data/src/ktp-common-internals/myBuild/kpeople/datasourceplugin/im-persons-data-source.moc:105
#21 0x00007fb0aa6bef9a in QMetaObject::activate (sender=0x69e6c80, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3713
#22 0x00007fafda571a08 in KTp::GlobalContactManager::allKnownContactsChanged (this=0x69e6c80, _t1=..., _t2=...) at /media/karry/data/src/ktp-common-internals/myBuild/KTp/moc_global-contact-manager.cpp:178
#23 0x00007fafda554226 in KTp::GlobalContactManager::onContactManagerStateChanged (this=0x69e6c80, contactManager=..., state=Tp::ContactListStateSuccess) at /media/karry/data/src/ktp-common-internals/KTp/global-contact-manager.cpp:138
#24 0x00007fafda554046 in KTp::GlobalContactManager::onConnectionReady (this=0x69e6c80, op=0x818ecb0) at /media/karry/data/src/ktp-common-internals/KTp/global-contact-manager.cpp:119
#25 0x00007fafda5717b6 in KTp::GlobalContactManager::qt_static_metacall (_o=0x69e6c80, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7ffe47e02e30) at /media/karry/data/src/ktp-common-internals/myBuild/KTp/moc_global-contact-manager.cpp:116
#26 0x00007fb0aa6bef9a in QMetaObject::activate (sender=0x818ecb0, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3713
#27 0x00007fafda12dd0f in Tp::PendingOperation::finished(Tp::PendingOperation*) () from /usr/lib/x86_64-linux-gnu/libtelepathy-qt5.so.0
#28 0x00007fafda12f430 in ?? () from /usr/lib/x86_64-linux-gnu/libtelepathy-qt5.so.0
#29 0x00007fb0aa6bfe71 in QObject::event (this=0x818ecb0, e=<optimized out>) at kernel/qobject.cpp:1239
#30 0x00007fb0aaf8305c in QApplicationPrivate::notify_helper (this=this@entry=0x249d5a0, receiver=receiver@entry=0x818ecb0, e=e@entry=0x71e8c50) at kernel/qapplication.cpp:3716
#31 0x00007fb0aaf88516 in QApplication::notify (this=0x7ffe47e03540, receiver=0x818ecb0, e=0x71e8c50) at kernel/qapplication.cpp:3499
#32 0x00007fb0aa6905bb in QCoreApplication::notifyInternal (this=0x7ffe47e03540, receiver=0x818ecb0, event=event@entry=0x71e8c50) at kernel/qcoreapplication.cpp:965
#33 0x00007fb0aa6929b6 in QCoreApplication::sendEvent (event=0x71e8c50, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#34 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x2493600) at kernel/qcoreapplication.cpp:1593
#35 0x00007fb0aa692e98 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#36 0x00007fb0aa6e6643 in postEventSourceDispatch (s=0x24d7c10) at kernel/qeventdispatcher_glib.cpp:271
#37 0x00007fb0a6a35127 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fb0a6a35380 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fb0a6a3542c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007fb0aa6e6a4f in QEventDispatcherGlib::processEvents (this=0x24d4c10, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#41 0x00007fb0aa68dd7a in QEventLoop::exec (this=this@entry=0x7ffe47e033c0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#42 0x00007fb0aa695e1c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#43 0x0000000000473899 in main (argc=2, argv=0x7ffe47e03688) at /media/karry/data/src/plasma-workspace/shell/main.cpp:139
Comment 4 Martin Klapetek 2016-03-31 03:09:56 UTC
Thanks for the report

Please post all patches to git.reviewboard.kde.org for review,
review group add "kdepim" and "telepathy".

Thanks!
Comment 5 Lukáš Karas 2016-03-31 07:48:24 UTC
Ok, I created review request: https://git.reviewboard.kde.org/r/127532/
Comment 6 Andrew Crouthamel 2018-11-01 13:55:34 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2018-11-16 11:39:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2018-12-02 03:45:28 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!