Bug 166465 - Gadu-Gadu protocol crashes Kopete
Summary: Gadu-Gadu protocol crashes Kopete
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: Gadu-Gadu Plugin (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 165038 165763 171750 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-13 19:34 UTC by Michal Witkowski
Modified: 2008-12-06 02:19 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Crash report (8.47 KB, text/plain)
2008-07-26 08:58 UTC, Kamil Kamiński
Details
Patch proposal that fixes broken contact list parser. (2.28 KB, patch)
2008-07-26 12:28 UTC, Kamil Kamiński
Details
Fix another issue with parser (538 bytes, patch)
2008-08-29 21:37 UTC, Jakub Grandys
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Witkowski 2008-07-13 19:34:16 UTC
Version:           0.50.80 (using KDE 4.0.83)
Installed from:    Unspecified Linux
Compiler:          4.3.1 
OS:                Linux

Kopete crashes upon connection to Gadu-Gadu account.

I'm moving to KDE 4.1RC1 from KDE 3.5.9. I copied over my kopeterc and everything seemed to work fine. I was able to connect to my Jabber account without problems and use it, however whenever I try to connect to Gadu-Gadu network, Kopete crashes.
The same thing happens with a clean Kopete profile and a Gadu-Gadu account created manually.

I've read a polish review of KDE 4.1Beta2 and the reviewer said he had the same problem, so it's probably not limited to myself.

Application: Kopete (kopete), signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb5ad4700 (LWP 4823)]           
[New Thread 0xb27ddb90 (LWP 4847)]           
[KCrash handler]                             
#6  0xb6fff2b3 in QString::operator= () from /usr/lib/libQtCore.so.4
#7  0xb2bf4b36 in GaduContactsList::GaduContactsList ()             
   from /opt/kdemod/lib/kde4/kopete_gadu.so                         
#8  0xb2be5592 in GaduAccount::userlist ()                          
   from /opt/kdemod/lib/kde4/kopete_gadu.so                         
#9  0xb2bea283 in GaduAccount::qt_metacall ()                       
   from /opt/kdemod/lib/kde4/kopete_gadu.so                         
#10 0xb70b4ee5 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0xb70b5bf9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb2bd9134 in GaduSession::userListRecieved ()                     
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#13 0xb2bda366 in GaduSession::handleUserlist ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#14 0xb2bdb71c in GaduSession::checkDescriptor ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#15 0xb2bdc45d in GaduSession::qt_metacall ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#16 0xb70b4ee5 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#17 0xb70b5bf9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#18 0xb70ecbac in QSocketNotifier::activated () from /usr/lib/libQtCore.so.4
#19 0xb70baada in QSocketNotifier::event () from /usr/lib/libQtCore.so.4
#20 0xb64588d3 in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#21 0xb645ffb2 in QApplication::notify () from /usr/lib/libQtGui.so.4
#22 0xb76d5fb4 in KApplication::notify () from /opt/kdemod/lib/libkdeui.so.5
#23 0xb70a1a3a in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#24 0xb70c9bac in ?? () from /usr/lib/libQtCore.so.4
#25 0xb5e7b0e8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#26 0xb5e7e783 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#27 0xb5e7e941 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#28 0xb70c994d in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#29 0xb64e798e in ?? () from /usr/lib/libQtGui.so.4
#30 0xb70a032f in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#31 0xb70a04f0 in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#32 0xb70a2869 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#33 0xb6458784 in QApplication::exec () from /usr/lib/libQtGui.so.4
#34 0x08087dcf in main ()
#0  0xb80a9424 in __kernel_vsyscall ()
Comment 1 Christophe Marin 2008-07-13 23:46:34 UTC
*** Bug 165763 has been marked as a duplicate of this bug. ***
Comment 2 Marco Broeder 2008-07-18 22:23:02 UTC
Tried to register a gadu account and kopete crashed immediately. Looks equal to the above. If you need an additional trace please let me know.

FreeBSD 7-STABLE amd64, gcc 4.2.1, KDE 4.0.98 (4.1 RC1)

Regards
Comment 3 Marco Broeder 2008-07-20 08:08:41 UTC
Sorry, seems like a different story, confused the traces.

Please look at https://bugs.kde.org/show_bug.cgi?id=155541 for the register account crash backtrace.

Regards
Comment 4 Michal Witkowski 2008-07-21 15:52:56 UTC
The same behaviour is seen in KDE 4.1 RC2 (4.0.99). It still crashes right after I connect.

New backtrace:
Application: Kopete (kopete), signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb5a2a700 (LWP 17499)]
[KCrash handler]
#6  0xb6f3c2b3 in QString::operator= () from /usr/lib/libQtCore.so.4
#7  0xb363cb36 in GaduContactsList::GaduContactsList ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#8  0xb362d592 in GaduAccount::userlist ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#9  0xb3632283 in GaduAccount::qt_metacall ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#10 0xb6ff1ee5 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0xb6ff2bf9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#12 0xb3621134 in GaduSession::userListRecieved ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#13 0xb3622366 in GaduSession::handleUserlist ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#14 0xb362371c in GaduSession::checkDescriptor ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#15 0xb362445d in GaduSession::qt_metacall ()
   from /opt/kdemod/lib/kde4/kopete_gadu.so
#16 0xb6ff1ee5 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#17 0xb6ff2bf9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#18 0xb7029bac in QSocketNotifier::activated () from /usr/lib/libQtCore.so.4
#19 0xb6ff7ada in QSocketNotifier::event () from /usr/lib/libQtCore.so.4
#20 0xb63ad8d3 in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#21 0xb63b4fb2 in QApplication::notify () from /usr/lib/libQtGui.so.4
#22 0xb760f784 in KApplication::notify () from /opt/kdemod/lib/libkdeui.so.5
#23 0xb6fdea3a in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#24 0xb7006bac in ?? () from /usr/lib/libQtCore.so.4
#25 0xb5dd10e8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#26 0xb5dd4783 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#27 0xb5dd4941 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#28 0xb700694d in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#29 0xb643c98e in ?? () from /usr/lib/libQtGui.so.4
#30 0xb6fdd32f in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#31 0xb6fdd4f0 in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#32 0xb6fdf869 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#33 0xb63ad784 in QApplication::exec () from /usr/lib/libQtGui.so.4
#34 0x08087ecf in main ()
#0  0xb7ff2424 in __kernel_vsyscall ()
Comment 5 Kamil Kamiński 2008-07-26 08:57:54 UTC
Same here, on KDE 4.1.60 (4.2) from 25.07.2008, kopete says:
Object::connect: No such slot GaduAccount::search()                                                        
Couldn't resolve property: radialGradient3709                                                              
kopete(28405) KWalletDLauncher::getInterface: The kwalletd service has been registered                     
QObject: Do not delete object, 'unnamed', during its event handler!                                        
QObject: Do not delete object, 'unnamed', during its event handler!
And right after crashes.
Comment 6 Kamil Kamiński 2008-07-26 08:58:50 UTC
Created attachment 26415 [details]
Crash report
Comment 7 Kamil Kamiński 2008-07-26 12:28:05 UTC
Created attachment 26418 [details]
Patch proposal that fixes broken contact list parser.

This is a patch proposal for gaducontactlist.cpp in current SVN tree. Error
occured because GaduContactList() constructor assumed static CVS field counts.
My contact list is causing misplaced pointer iterators and SEGFAULT. This patch
fixes that behaviour.
Comment 8 Kamil Kamiński 2008-07-26 13:40:56 UTC
Comment on attachment 26418 [details]
Patch proposal that fixes broken contact list parser.

Index: protocols/gadu/gaducontactlist.cpp
===================================================================
--- protocols/gadu/gaducontactlist.cpp	(wersja 837988)
+++ protocols/gadu/gaducontactlist.cpp	(kopia robocza)
@@ -104,10 +104,10 @@
			++stringIterator;
			++stringIterator;

-			if ( stringIterator != strList.end() ) {
+			if ( strList.count() >= 13 )
				cl.offlineTo = (*++stringIterator) ==
QString('0') ? false : true;
+			if ( strList.count() >= 14 )
				cl.landline  = (*++stringIterator);
-			}
		}
		else {
			 cl.email	= empty;
Comment 9 Dirk Mueller 2008-08-18 01:09:12 UTC
*** Bug 165038 has been marked as a duplicate of this bug. ***
Comment 10 Jakub Grandys 2008-08-29 21:37:29 UTC
Created attachment 27133 [details]
Fix another issue with parser

I have had very similar issue with contact list parser. My contact list was malformed on the server side, one of entries was to short, it even didn't contained UIN. This fix ignores entries which are way too short.

BTW can someone with svn account apply those patches? It seems gadu plugin is somehow unmaintained.
Comment 11 Roman Jarosz 2008-09-03 10:40:10 UTC
SVN commit 856461 and 856462 by rjarosz:

Fix Gadu-Gadu crashes.
Patches by Kamil Kamiński and Jakub Grandys, thanks!

M  +9 -4      gaducontactlist.cpp  
Comment 12 Dario Andres 2008-12-06 02:19:46 UTC
*** Bug 171750 has been marked as a duplicate of this bug. ***