Kopete crash when moving or deleting contacts

Bug #1072785 reported by Scott Kitterman on 2012-10-29
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KDE Network
Fix Released
High
kdenetwork (Ubuntu)
High
Scott Kitterman
Quantal
High
Scott Kitterman
Raring
High
Scott Kitterman

Bug Description

Fixed upstream in http://websvn.kde.org/?revision=1322414&view=revision but there is significant user interest in getting the fix before 4.9.3 is out.

[IMPACT]

 * When someone is using kopete, if they delete or move a contact, kopete crashes

[TESTCASE]

 * Install kopete and set it up.
 * Move or delete a contact
 * See kopete crash
* Update to the new version
* Move or delete a contact
* See it not crash

[Regression Potential]

 * Regression potential is low. This is a backport of the upstream fix that will come later in 4.9.3.

Download full text (8.1 KiB)

Application that crashed: kopete
Version of the application: 0.80.2
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.5.2
Operating System: Linux 2.6.31-20-generic x86_64
Distribution: Ubuntu 9.10

What I was doing when the application crashed:
Using the jabber protocol. I got a notification that a user removed me from their list. I chose to remove them as well and delete them off of my list. Kopete crashed at that point.

 -- Backtrace:
Application: Kopete (kopete), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f893ac3c750 (LWP 2727))]

Thread 3 (Thread 0x7f891b17f910 (LWP 2749)):
#0 0x00007f893725c3c3 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1 0x00007f8932cdf37c in ?? () from /lib/libglib-2.0.so.0
#2 0x00007f8932cdf6c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3 0x00007f89385291fe in QEventDispatcherGlib::processEvents (this=0x2a56710, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:329
#4 0x00007f89384ff532 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5 0x00007f89384ff904 in QEventLoop::exec (this=0x2976710, flags=) at kernel/qeventloop.cpp:201
#6 0x00007f891bc43123 in QCA::SyncThread::run() () from /usr/lib/libqca.so.2
#7 0x00007f893841a445 in QThreadPrivate::start (arg=0x2a5e4b0) at thread/qthread_unix.cpp:188
#8 0x00007f8932a8aa04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9 0x00007f893726880d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f891a97e910 (LWP 2750)):
#0 0x00007f893725c3c3 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=2746) at ../sysdeps/unix/sysv/linux/poll.c:87
#1 0x00007f8932cdf37c in ?? () from /lib/libglib-2.0.so.0
#2 0x00007f8932cdf6c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3 0x00007f89385291fe in QEventDispatcherGlib::processEvents (this=0x2959460, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:329
#4 0x00007f89384ff532 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5 0x00007f89384ff904 in QEventLoop::exec (this=0x2b73f60, flags=) at kernel/qeventloop.cpp:201
#6 0x00007f891c0937c2 in ?? () from /usr/lib/kde4/kopete_jabber.so
#7 0x00007f893841a445 in QThreadPrivate::start (arg=0x2b45550) at thread/qthread_unix.cpp:188
#8 0x00007f8932a8aa04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9 0x00007f893726880d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f893ac3c750 (LWP 2727)):
[KCrash Handler]
#5 0x00007f893a32ae34 in Kopete::Contact::account() const () from /usr/lib/libkopete.so.4
#6 0x00007f893a32b404 in Kopete::Contact::onlineStatus() const () from /usr/lib/libkopete.so.4
#7 0x00007f893a32b479 in Kopete::Contact::isOnline() const () from /usr/lib/libkopete.so.4
#8 0x00007f893a32b421 in Kopete::Contact::onlineStatus() const () from /usr/lib/libkopete.so.4
#9 0x00007f893a32b479 in Kopete::Contact::isOnline() const () from...

Read more...

*** Bug 301989 has been marked as a duplicate of this bug. ***

*** Bug 307950 has been marked as a duplicate of this bug. ***

*** Bug 307986 has been marked as a duplicate of this bug. ***

*** Bug 298290 has been marked as a duplicate of this bug. ***

Created attachment 74390
Valgrind log of the crash

This is a valgrind log for the crash. It shows the crash but I could not see why it crases. I hope somebody else is able to interpret the valgrind log better than me.

This also happens when adding a contact to a metacontact :(

Created attachment 74448
New crash information added by DrKonqi

kopete (1.3.2) on KDE Platform 4.9.2 using Qt 4.8.2

- What I was doing when the application crashed:

Grouped contact to the meta-contact. Kopete crashed.

-- Backtrace (Reduced):
#6 0x00007fa6ec72f509 in QList (l=..., this=0x7fffbb751460) at /usr/include/qt4/QtCore/qlist.h:122
#7 QListIterator (container=..., this=0x7fffbb751460) at /usr/include/qt4/QtCore/qlist.h:902
#8 Kopete::MetaContact::isOnline (this=0x2d73260) at ../../../kopete/libkopete/kopetemetacontact.cpp:516
#9 0x00007fa6ec036e9e in Kopete::UI::ContactListTreeModel::countConnected (this=<optimized out>, gmi=<optimized out>) at ../../../../kopete/kopete/contactlist/contactlisttreemodel.cpp:233
#10 0x00007fa6ec0370f3 in Kopete::UI::ContactListTreeModel::data (this=0x22c41e0, index=..., role=138) at ../../../../kopete/kopete/contactlist/contactlisttreemodel.cpp:318

Created attachment 74502
New crash information added by DrKonqi

kopete (1.3.2) on KDE Platform 4.9.2 using Qt 4.8.2

It happens when I add xmpp contact to kopete.

-- Backtrace (Reduced):
#6 0x00007f93f06bbdba in Kopete::MetaContact::isOnline() const () from /usr/lib64/libkopete.so.4
#7 0x00007f93effb33d6 in Kopete::UI::ContactListTreeModel::countConnected(Kopete::UI::GroupModelItem*) const () from /usr/lib64/libkopetecontactlist.so.1
#8 0x00007f93effb3635 in Kopete::UI::ContactListTreeModel::data(QModelIndex const&, int) const () from /usr/lib64/libkopetecontactlist.so.1
#9 0x00007f93effbcb29 in Kopete::UI::ContactListProxyModel::filterAcceptsRow(int, QModelIndex const&) const () from /usr/lib64/libkopetecontactlist.so.1
#10 0x00007f93ee059f45 in QSortFilterProxyModelPrivate::_q_sourceDataChanged(QModelIndex const&, QModelIndex const&) () from /usr/lib64/qt4/libQtGui.so.4

Relevant part of kopete svn1316028 backtrace crash when moving subcontact to another metacontact:
#6 0x00007fdbc4195529 in QList (l=..., this=0x7fffa9809e40) at /usr/include/qt4/QtCore/qlist.h:122
#7 QListIterator (container=..., this=0x7fffa9809e40) at /usr/include/qt4/QtCore/qlist.h:902
#8 Kopete::MetaContact::isOnline (this=0x2de17d0) at /build/buildd/kopete-4.10-svn1316028/kopete/libkopete/kopetemetacontact.cpp:516
#9 0x00007fdbc3a9ce4e in Kopete::UI::ContactListTreeModel::countConnected (this=<optimized out>, gmi=<optimized out>) at /build/buildd/kopete-4.10-svn1316028/kopete/kopete/contactlist/contactlisttreemodel.cpp:233
#10 0x00007fdbc3a9d0a3 in Kopete::UI::ContactListTreeModel::data (this=0x1f6d980, index=..., role=138) at /build/buildd/kopete-4.10-svn1316028/kopete/kopete/contactlist/contactlisttreemodel.cpp:318
#11 0x00007fdbc3aa640a in Kopete::UI::ContactListProxyModel::filterAcceptsRow (this=0x1f6f0c0, sourceRow=<optimized out>, sourceParent=...) at /build/buildd/kopete-4.10-svn1316028/kopete/kopete/contactlist/contactlistproxymodel.cpp:139

Created attachment 74779
patch which fix crashing

With this patch I'm not able to reproduce crash again. Please test it if it really fixing this bug.

(In reply to comment #10)
> Created attachment 74779 [details]
> patch which fix crashing
>
> With this patch I'm not able to reproduce crash again. Please test it if it
> really fixing this bug.

I confirm. I can not reproduce crash with this patch on Gentoo Amd64 KDE 4.9.2/Kopete 1.3.2.
Thanks Pali for submitting your patch =:)

SVN commit 1322413 by pali:

Fix crashing Kopete when moving or deleting contact

 M +6 -3 contactlisttreemodel.cpp
 M +3 -1 contactlisttreemodel_p.h

WebSVN link: http://websvn.kde.org/?view=rev&revision=1322413

SVN commit 1322414 by pali:

Backport r1322413 to 4.9 branch:

Fix crashing Kopete when moving or deleting contact

 M +6 -3 contactlisttreemodel.cpp
 M +3 -1 contactlisttreemodel_p.h

WebSVN link: http://websvn.kde.org/?view=rev&revision=1322414

Changed in kdenetwork:
importance: Unknown → High
status: Unknown → Fix Released
Scott Kitterman (kitterman) wrote :

Uploladed the fix for Kubuntu for quantal and raring. For raring the fix will be available as soon as the packages are built (they are in the building queu now). For quantal, the fix will first have to be reviewed by the stable release updates team and then be tested. Keep an eye on this bug for details.

Changed in kdenetwork (Ubuntu Quantal):
importance: Undecided → High
Changed in kdenetwork (Ubuntu Raring):
importance: Undecided → High
Changed in kdenetwork (Ubuntu Quantal):
status: New → In Progress
Changed in kdenetwork (Ubuntu Raring):
status: New → In Progress
Changed in kdenetwork (Ubuntu Quantal):
assignee: nobody → Scott Kitterman (kitterman)
Changed in kdenetwork (Ubuntu Raring):
assignee: nobody → Scott Kitterman (kitterman)
Changed in kdenetwork (Ubuntu Quantal):
milestone: none → quantal-updates
Changed in kdenetwork (Ubuntu Raring):
milestone: none → ubuntu-13.04-beta-1
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdenetwork - 4:4.9.2-0ubuntu3

---------------
kdenetwork (4:4.9.2-0ubuntu3) raring; urgency=low

  * Cherrypick fix from upstream to solve kopete crashes when contacts
    are moved or deleted (LP: #1072785)
 -- Scott Kitterman <email address hidden> Mon, 29 Oct 2012 17:13:36 +0100

Changed in kdenetwork (Ubuntu Raring):
status: In Progress → Fix Released

Hello Scott, or anyone else affected,

Accepted kdenetwork into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/kdenetwork/4:4.9.2-0ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in kdenetwork (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
Scott Kitterman (kitterman) wrote :

I tested this and have verified the fix prevents the crash.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdenetwork - 4:4.9.2-0ubuntu2.1

---------------
kdenetwork (4:4.9.2-0ubuntu2.1) quantal-proposed; urgency=low

  * Cherrypick fix from upstream to solve kopete crashes when contacts
    are moved or deleted (LP: #1072785)
 -- Scott Kitterman <email address hidden> Mon, 29 Oct 2012 17:13:36 +0100

Changed in kdenetwork (Ubuntu Quantal):
status: Fix Committed → Fix Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.