Bug 204243 - Kopete crashes after the first status cycle online->offline->online (PropertyContainer::property, setProperty, JabberAccount::slotContactUpdated)
Summary: Kopete crashes after the first status cycle online->offline->online (Property...
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: Jabber Plugin (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 208069 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-08-18 09:33 UTC by Damir Islamov
Modified: 2009-12-27 17:24 UTC (History)
2 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 Damir Islamov 2009-08-18 09:33:03 UTC
Application that crashed: kopete
Version of the application: 0.70.90
KDE Version: 4.3.00 (KDE 4.3.0)
Qt Version: 4.5.2
Operating System: Linux 2.6.30-1-686 i686
Distribution: Debian GNU/Linux unstable (sid)

What I was doing when the application crashed:
How to reproduce:
1. start kopete
2. set the status online
3. set the status offline
4. set the status online
5. kopete crashes now

I use jabber accounts only.

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

Thread 3 (Thread 0xb2fb2b90 (LWP 4368)):
#0  0xb5dd8ed4 in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#1  0xb5dd97f5 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0xb5dd9a48 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0xb74ff817 in QEventDispatcherGlib::processEvents (this=0x87b1848, flags=...) at kernel/qeventdispatcher_glib.cpp:329
#4  0xb74d2fba in QEventLoop::processEvents (this=0x87b1858, flags=...) at kernel/qeventloop.cpp:149
#5  0xb74d3402 in QEventLoop::exec (this=0x87b1858, flags=...) at kernel/qeventloop.cpp:201
#6  0xb30db829 in QCA::SyncThread::run() () from /usr/lib/libqca.so.2
#7  0xb73e3522 in QThreadPrivate::start (arg=0x87c1210) at thread/qthread_unix.cpp:188
#8  0xb5d8a4b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#9  0xb6863a5e in clone () from /lib/i686/cmov/libc.so.6

Thread 2 (Thread 0xb22d9b90 (LWP 4369)):
#0  0xb5dd980d in ?? () from /usr/lib/libglib-2.0.so.0
#1  0xb5dd9a48 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#2  0xb74ff817 in QEventDispatcherGlib::processEvents (this=0x8a5eda8, flags=...) at kernel/qeventdispatcher_glib.cpp:329
#3  0xb74d2fba in QEventLoop::processEvents (this=0x8a658a8, flags=...) at kernel/qeventloop.cpp:149
#4  0xb74d3402 in QEventLoop::exec (this=0x8a658a8, flags=...) at kernel/qeventloop.cpp:201
#5  0xb33483c2 in XMPP::SyncThread::run (this=0x8a98aa8) at ../../../../../kopete/protocols/jabber/libiris/iris/irisnet/corelib/netinterface.cpp:151
#6  0xb73e3522 in QThreadPrivate::start (arg=0x8a98aa8) at thread/qthread_unix.cpp:188
#7  0xb5d8a4b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#8  0xb6863a5e in clone () from /lib/i686/cmov/libc.so.6

Thread 1 (Thread 0xb5795700 (LWP 4300)):
[KCrash Handler]
#6  Kopete::PropertyContainer::hasProperty (this=0x0, key=...) at ../../../kopete/libkopete/kopetepropertycontainer.cpp:108
#7  0xb7fd6e1f in Kopete::PropertyContainer::property (this=0x0, key=...) at ../../../kopete/libkopete/kopetepropertycontainer.cpp:113
#8  0xb7fd72a2 in Kopete::PropertyContainer::setProperty (this=0x0, tmpl=..., value=...) at ../../../kopete/libkopete/kopetepropertycontainer.cpp:145
#9  0xb322b633 in JabberAccount::slotContactUpdated (this=0x87c8478, item=...) at ../../../../kopete/protocols/jabber/jabberaccount.cpp:1339
#10 0xb32309e8 in JabberAccount::qt_metacall (this=0x87c8478, _c=QMetaObject::InvokeMetaMethod, _id=29, _a=0xbfcaaabc) at ./jabberaccount.moc:169
#11 0xb74e9ad3 in QMetaObject::activate (sender=0x8634d38, from_signal_index=12, to_signal_index=12, argv=0xbfcaaabc) at kernel/qobject.cpp:3112
#12 0xb74ea722 in QMetaObject::activate (sender=0x8634d38, m=0xb33bad44, local_signal_index=8, argv=0xbfcaaabc) at kernel/qobject.cpp:3186
#13 0xb3277833 in JabberClient::newContact (this=0x8634d38, _t1=...) at ./jabberclient.moc:266
#14 0xb3277864 in JabberClient::slotNewContact (this=0x8634d38, item=...) at ../../../../kopete/protocols/jabber/jabberclient.cpp:1128
#15 0xb327a00b in JabberClient::qt_metacall (this=0x8634d38, _c=QMetaObject::InvokeMetaMethod, _id=33, _a=0xbfcaabdc) at ./jabberclient.moc:188
#16 0xb74e9ad3 in QMetaObject::activate (sender=0xab51298, from_signal_index=7, to_signal_index=7, argv=0xbfcaabdc) at kernel/qobject.cpp:3112
#17 0xb74ea722 in QMetaObject::activate (sender=0xab51298, m=0xb33bb064, local_signal_index=3, argv=0xbfcaabdc) at kernel/qobject.cpp:3186
#18 0xb3280e53 in XMPP::Client::rosterItemAdded (this=0xab51298, _t1=...) at moc_xmpp_client.cpp:178
#19 0xb32a06e5 in XMPP::Client::importRosterItem (this=0xab51298, item=...) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-im/client.cpp:970
#20 0xb32a0744 in XMPP::Client::importRoster (this=0xab51298, r=...) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-im/client.cpp:919
#21 0xb32a07ac in XMPP::Client::slotRosterRequestFinished (this=0xab51298) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-im/client.cpp:894
#22 0xb3284de8 in XMPP::Client::qt_metacall (this=0xab51298, _c=QMetaObject::InvokeMetaMethod, _id=23, _a=0xbfcaaee8) at moc_xmpp_client.cpp:141
#23 0xb74e9ad3 in QMetaObject::activate (sender=0xac4d4f8, from_signal_index=4, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3112
#24 0xb74ea722 in QMetaObject::activate (sender=0xac4d4f8, m=0xb33bb144, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3186
#25 0xb327fd87 in XMPP::Task::finished (this=0xac4d4f8) at moc_xmpp_task.cpp:84
#26 0xb32d0ff3 in XMPP::Task::done (this=0xac4d4f8) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-im/xmpp_task.cpp:216
#27 0xb32f33f7 in XMPP::JT_Roster::take (this=0xac4d4f8, x=...) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-im/xmpp_tasks.cpp:480
#28 0xb32d11dc in XMPP::Task::take (this=0xab513f8, x=...) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-im/xmpp_task.cpp:139
#29 0xb329b198 in XMPP::Client::distribute (this=0xab51298, x=...) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-im/client.cpp:580
#30 0xb329ba87 in XMPP::Client::streamReadyRead (this=0xab51298) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-im/client.cpp:527
#31 0xb3284e26 in XMPP::Client::qt_metacall (this=0xab51298, _c=QMetaObject::InvokeMetaMethod, _id=20, _a=0xbfcab238) at moc_xmpp_client.cpp:138
#32 0xb74e9ad3 in QMetaObject::activate (sender=0x9fc1a60, from_signal_index=6, to_signal_index=6, argv=0x0) at kernel/qobject.cpp:3112
#33 0xb74ea722 in QMetaObject::activate (sender=0x9fc1a60, m=0xb33bb0d4, local_signal_index=2, argv=0x0) at kernel/qobject.cpp:3186
#34 0xb3280357 in XMPP::Stream::readyRead (this=0x9fc1a60) at moc_xmpp_stream.cpp:99
#35 0xb330788d in XMPP::ClientStream::doReadyRead (this=0x9fc1a60) at ../../../../../kopete/protocols/jabber/libiris/iris/xmpp/xmpp-core/stream.cpp:892
#36 0xb3283056 in XMPP::ClientStream::qt_metacall (this=0x9fc1a60, _c=QMetaObject::InvokeMetaMethod, _id=25, _a=0xbfcab338) at moc_xmpp_clientstream.cpp:133
#37 0xb74e9ad3 in QMetaObject::activate (sender=0x86b1e80, from_signal_index=4, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3112
#38 0xb74ea722 in QMetaObject::activate (sender=0x86b1e80, m=0xb75c4d88, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3186
#39 0xb74ef7e7 in QSingleShotTimer::timeout (this=0x86b1e80) at .moc/release-shared/qtimer.moc:76
#40 0xb74ef90c in QSingleShotTimer::timerEvent (this=0x86b1e80) at kernel/qtimer.cpp:298
#41 0xb74e4b6f in QObject::event (this=0x86b1e80, e=0xbfcab7bc) at kernel/qobject.cpp:1074
#42 0xb6b147d4 in QApplicationPrivate::notify_helper (this=0x84256e0, receiver=0x86b1e80, e=0xbfcab7bc) at kernel/qapplication.cpp:4056
#43 0xb6b1c93e in QApplication::notify (this=0xbfcaba4c, receiver=0x86b1e80, e=0xbfcab7bc) at kernel/qapplication.cpp:3603
#44 0xb7a4700d in KApplication::notify (this=0xbfcaba4c, receiver=0x86b1e80, event=0xbfcab7bc) at ../../kdeui/kernel/kapplication.cpp:302
#45 0xb74d496b in QCoreApplication::notifyInternal (this=0xbfcaba4c, receiver=0x86b1e80, event=0xbfcab7bc) at kernel/qcoreapplication.cpp:610
#46 0xb7503301 in QCoreApplication::sendEvent (this=0x840d974) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#47 QTimerInfoList::activateTimers (this=0x840d974) at kernel/qeventdispatcher_unix.cpp:572
#48 0xb74ff8a0 in timerSourceDispatch (source=0x840d940) at kernel/qeventdispatcher_glib.cpp:165
#49 0xb5dd6368 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#50 0xb5dd98c3 in ?? () from /usr/lib/libglib-2.0.so.0
#51 0xb5dd9a48 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#52 0xb74ff7f8 in QEventDispatcherGlib::processEvents (this=0x83ef988, flags=...) at kernel/qeventdispatcher_glib.cpp:327
#53 0xb6bb3f85 in QGuiEventDispatcherGlib::processEvents (this=0x83ef988, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#54 0xb74d2fba in QEventLoop::processEvents (this=0xbfcab9e0, flags=...) at kernel/qeventloop.cpp:149
#55 0xb74d3402 in QEventLoop::exec (this=0xbfcab9e0, flags=...) at kernel/qeventloop.cpp:201
#56 0xb74d5859 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#57 0xb6b14657 in QApplication::exec () at kernel/qapplication.cpp:3525
#58 0x08059653 in main (argc=3, argv=0xbfcabe54) at ../../../kopete/kopete/main.cpp:104

Reported using DrKonqi
Comment 1 Damir Islamov 2009-08-26 09:29:08 UTC
Additional info:

After the step
> 4. set the status online
"Fatal error in the Jabber contact pool..." exception occures from here
.../kopete/protocols/jabber/jabbercontactpool.cpp:

JabberContact *JabberContactPool::addContact ( const XMPP::RosterItem &contact, Kopete::MetaContact *metaContact, bool dirty )
{
        // see if the contact already exists
        JabberContactPoolItem *mContactItem = findPoolItem ( contact );
        if ( mContactItem)
        {
                kDebug(JABBER_DEBUG_GLOBAL) << "Updating existing contact " << contact.jid().full() << "   -  " <<   mContactItem->contact();

                // It exists, update it.
                mContactItem->contact()->updateContact ( contact );
                mContactItem->setDirty ( dirty );

                JabberContact *retval = dynamic_cast<JabberContact *>(mContactItem->contact ());

                if ( !retval )
                {
                        KMessageBox::error ( Kopete::UI::Global::mainWidget (),
                                                                 "Fatal error in the Jabber contact pool. Please restart Kopete and submit a debug log "
                                                                 "of your session to http://bugs.kde.org.",
                                                                 "Fatal Jabber Error" );
                }

                return retval;
        }


i.e. retval=NULL, which leads to 
Thread 1 (Thread 0xb5795700 (LWP 4300)):
[KCrash Handler]
#6  Kopete::PropertyContainer::hasProperty (this=0x0, key=...) at
../../../kopete/libkopete/kopetepropertycontainer.cpp:108
#7  0xb7fd6e1f in Kopete::PropertyContainer::property (this=0x0, key=...) at
../../../kopete/libkopete/kopetepropertycontainer.cpp:113
#8  0xb7fd72a2 in Kopete::PropertyContainer::setProperty (this=0x0, tmpl=...,
value=...) at ../../../kopete/libkopete/kopetepropertycontainer.cpp:145
#9  0xb322b633 in JabberAccount::slotContactUpdated (this=0x87c8478, item=...)
at ../../../../kopete/protocols/jabber/jabberaccount.cpp:1339
Comment 2 Matt Rogers 2009-09-05 06:27:47 UTC
Thanks for the information! Some additional questions:

 - Do you have multiple Jabber accounts or just one? 
 - Does one (or more) of your Jabber accounts have a fairly large contact list? If so, how big would you estimate it is?
Comment 3 Damir Islamov 2009-09-06 20:37:44 UTC
1. I have 4 jabber accounts.
2. Some of accounts have about 20 items in contact list. Other ones have less than 10 items.
3. Several items from contact lists of different accounts are merged into metacontacts.
Comment 4 Dario Andres 2009-09-22 17:03:17 UTC
*** Bug 208069 has been marked as a duplicate of this bug. ***
Comment 5 Brian DeRocher 2009-10-02 20:12:08 UTC
Also experiencing this bug.  I have 2 identities.  One with 1 jabber account and one with 2 jabber accounts.

For me the crash occurs at arbitrary times, not triggered by me.
Comment 6 Roman Jarosz 2009-12-27 17:24:22 UTC
SVN commit 1066641 by rjarosz:

Don't crash if user has "contact" in contact list with the same jid as group chat.
TODO: We should remove the invalid user with JT_Roster task (wait for ack) and then join the group chat.

BUG: 204243



 M  +2 -0      jabberaccount.cpp  
 M  +6 -4      jabbercontactpool.cpp  


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