Bug 147434 - Deleting Gadu-Gadu (multi)contacts witch had multiplied themselves causes Kopete to crash
Summary: Deleting Gadu-Gadu (multi)contacts witch had multiplied themselves causes Kop...
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: Gadu-Gadu Plugin (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-02 00:00 UTC by Michał ,,KNT'' Gorycki
Modified: 2011-07-09 22:25 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.2


Attachments
Path for gaducontactlist.cpp (1.19 KB, patch)
2009-11-01 14:20 UTC, Maciej `Matrach` Matraszek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał ,,KNT'' Gorycki 2007-07-02 00:00:09 UTC
Version:           0.12.5 (using KDE KDE 3.5.7)
Installed from:    Debian testing/unstable Packages
OS:                Linux

As far as I remember using GG with Kopete, some contacts multiplied themselves. The only way to remove them was by editing the config by hand. But reconect and voila! More clones.
As for now I've noticed two types: one with a correct GG UIN, and a UIN equal "0". Trying to delete them causes to be deleted, then few seconds noting and Kopete chrashes. Restarting Kopete and all the multiplied contacts are back in place.

A tasty backtrace:

(Stripped a lot of "(no debugging symbols found)")

(no debugging symbols found)
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
[...]
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1241581872 (LWP 25258)]
(no debugging symbols found)
[...]
(no debugging symbols found)
[KCrash handler]
#6  0xb6087135 in malloc_usable_size () from /lib/i686/cmov/libc.so.6
#7  0xb6088c2f in mallopt () from /lib/i686/cmov/libc.so.6
#8  0xb608c530 in free () from /lib/i686/cmov/libc.so.6
#9  0xb624a611 in operator delete () from /usr/lib/libstdc++.so.6
#10 0xb624a66d in operator delete[] () from /usr/lib/libstdc++.so.6
#11 0xb6b93490 in QStringData::~QStringData () from /usr/lib/libqt-mt.so.3
#12 0xb6b8acd1 in QStringData::deleteSelf () from /usr/lib/libqt-mt.so.3
#13 0x080a0b74 in QMapPrivate<QString, QString>::clear ()
#14 0x080a0b32 in QMapPrivate<QString, QString>::clear ()
#15 0x080a0b32 in QMapPrivate<QString, QString>::clear ()
#16 0x080a0b32 in QMapPrivate<QString, QString>::clear ()
#17 0x080a0bbc in QMapPrivate<QString, QString>::clear ()
#18 0xb7e9242e in QMap<QString, QString>::operator= ()
   from /usr/lib/libkopete.so.1
#19 0xb7e695a0 in Kopete::ContactListElement::setPluginData ()
   from /usr/lib/libkopete.so.1
#20 0xb7e69d76 in Kopete::Protocol::slotMetaContactAboutToSave ()
   from /usr/lib/libkopete.so.1
#21 0xb7e6a236 in Kopete::Protocol::qt_invoke () from /usr/lib/libkopete.so.1
#22 0xb4f4ce7b in JabberProtocol::qt_invoke ()
   from /usr/lib/kde3/kopete_jabber.so
#23 0xb6870e70 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#24 0xb7e2cefe in Kopete::MetaContact::aboutToSave ()
   from /usr/lib/libkopete.so.1
#25 0xb7e57969 in Kopete::MetaContact::toXML () from /usr/lib/libkopete.so.1
#26 0xb7e58d26 in Kopete::ContactList::toXML () from /usr/lib/libkopete.so.1
#27 0xb7e6d6a0 in Kopete::ContactList::saveXML () from /usr/lib/libkopete.so.1
#28 0xb7e6d91d in Kopete::ContactList::save () from /usr/lib/libkopete.so.1
#29 0xb7e767b1 in Kopete::ContactList::qt_invoke ()
   from /usr/lib/libkopete.so.1
#30 0xb6870d43 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#31 0xb68717e8 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#32 0xb6bff76e in QTimer::timeout () from /usr/lib/libqt-mt.so.3
#33 0xb6898b22 in QTimer::event () from /usr/lib/libqt-mt.so.3
#34 0xb6808500 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#35 0xb680a32f in QApplication::notify () from /usr/lib/libqt-mt.so.3
#36 0xb6fae142 in KApplication::notify () from /usr/lib/libkdecore.so.4
#37 0xb679b5b5 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#38 0xb67fae8b in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#39 0xb67afa30 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#40 0xb6822c06 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#41 0xb6822a16 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#42 0xb680a0a9 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#43 0x0807fe7b in ?? ()
#44 0xbfd8a1dc in ?? ()
#45 0xbfd8a310 in ?? ()
#46 0xbfd8a308 in ?? ()
#47 0x00000000 in ?? ()
Comment 1 Matt Rogers 2007-09-12 06:04:12 UTC
Not sure the problem is in Gadu, since there's some bits of Jabber in the backtrace, but Gadu is probably the best place to start.
Comment 2 Michael 2008-07-22 18:02:48 UTC
I could successfuly delete those clones with kopete svn trunk r836553. No crash or something, allthough those clones tend to reappear.
Comment 3 rainy 2009-03-07 01:47:07 UTC
Since gg7.0 there is an additional (first one) line in contact list. It contains 'GG70ExportString'. Parsing such a list with old algoritm will return a contact with number 0. I deleted contact list from gg server (in original client), then I cleared kopete's contact list and after connection contact 'GG70ExportString' appeared in kopete (with number 0). With every next connection one more GG70ExportString contact is appearing. 
If there are some contacts in kopete's contact list, these are somehow mixed with that with 0 number. With every connection to gg, one more (or more) contact with 0 number is appearing but it's name is one of these from the list (can be GG70ExportString).
Comment 4 Mieszko Ślusarczyk 2009-03-28 10:36:09 UTC
I get about 30 now "0"contacts every start and no deleting of contactlist on server helps. I tried to delete contactlist with pidgin and it didn't help.
For now maybe disabling autosychronisation of contacts (#185230) would be a workaround...
Comment 5 shade 2009-05-22 11:36:48 UTC
0 isnt a contact realy, is number of that is used by gadu gadu to send comercial stuff, this thing should be blocked by kopete.
Comment 6 Maciej `Matrach` Matraszek 2009-11-01 14:20:54 UTC
Created attachment 38006 [details]
Path for gaducontactlist.cpp

It solves:
-Crashing when deleting
-Importing '0' contact
-Export now works and can be imported in native program
Comment 7 Maciej `Matrach` Matraszek 2009-11-01 14:26:38 UTC
Also polish characters wasn't working, so I made another patch:
(I'm sorry for publishing it in this bug...)

--- kdenetwork-4.3.1/kopete/protocols/gadu/gadusession.cpp	2008-12-10 17:14:05.000000000 +0100
+++ kopete-4.2.4/kopete/protocols/gadu/gadusession.cpp	2009-11-01 13:18:00.000000000 +0100
@@ -550,9 +550,9 @@
 	QString ul;
 	switch( event->event.userlist.type ) {
 		case GG_USERLIST_GET_REPLY:
 			if ( event->event.userlist.reply ) {
-				ul = event->event.userlist.reply;
+				ul = textcodec->toUnicode(event->event.userlist.reply);
 				kDebug( 14100 ) << "Got Contacts list  OK ";
 			}
 			else {
 				kDebug( 14100 ) << "Got Contacts list  FAILED/EMPTY ";



Sorry, if the patch is in wrong format, I have generated it for the first time.
Comment 8 Nicolas L. 2010-06-18 15:26:53 UTC
Please open a ticket on reviewboard.kde.org and add the patch 


thanks
Comment 9 Lamarque V. Souza 2011-03-17 20:37:33 UTC
Is this problem still happening? Can I close this bug?

The patch in comment #6 was applied in kopete some time ago. I will apply the patch in comment #7.
Comment 10 Lamarque V. Souza 2011-03-17 20:39:39 UTC
SVN commit 1225171 by lvsouza:

Apply fix for lack of unicode translation in Gadu plugin.
Thanks Maciej `Matrach` Matraszek for the patch.

CCBUG: 147434
FIXED-IN: 4.6.2


 M  +1 -1      gadusession.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225171
Comment 11 Lamarque V. Souza 2011-03-17 20:42:11 UTC
SVN commit 1225172 by lvsouza:

Backporting r1225171: Apply fix for lack of unicode translation in Gadu plugin.
Thanks Maciej `Matrach` Matraszek for the patch.

CCBUG: 147434
FIXED-IN: 4.6.2


 M  +1 -1      gadusession.cpp  


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