Bug 102735 - Kopete segmentation fault on unloading MSN plugin
Summary: Kopete segmentation fault on unloading MSN plugin
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: libkopete (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
: 101722 103040 103072 103321 104058 104871 106584 107152 108464 112718 116936 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-29 14:08 UTC by Jes Hall
Modified: 2005-11-23 12:20 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (1.02 KB, text/plain)
2005-03-29 14:17 UTC, Jes Hall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jes Hall 2005-03-29 14:08:37 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          Gcc 3.3.4 
OS:                Linux

Kopete crashes with a segmentation fault whenever the MSN plugin is unloaded - either by deleting an account, or exiting the program. Attaching a backtrace to this bug report.
Comment 1 Jes Hall 2005-03-29 14:17:04 UTC
Created attachment 10403 [details]
Backtrace

This backtrace seems kinda short - would it help if I recompiled kdelibs also
with debug info? I have a long file also with what Kopete was printing to
stdout if anyone wants that too.
Comment 2 Thiago Macieira 2005-03-29 15:09:10 UTC
Pasting the backtrace:

#0  0x00000003 in ?? ()
#1  0x40124d6b in ~PasswordedAccount (this=0x827f768) at kopetepasswordedaccount.cpp:47
#2  0x421094e6 in ~MSNAccount (this=0x827f768) at msnaccount.moc:64
#3  0x4133d9dc in QObject::event () from /usr/lib/qt/lib/libqt-mt.so.3
#4  0x412e384f in QApplication::internalNotify () from /usr/lib/qt/lib/libqt-mt.so.3
#5  0x412e2e4e in QApplication::notify () from /usr/lib/qt/lib/libqt-mt.so.3
#6  0x40e7e5cb in KApplication::notify () from /opt/kde-unstable/lib/libkdecore.so.4
#7  0x412e4646 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#8  0x412e44c6 in QApplication::sendPostedEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#9  0x4128d5aa in QEventLoop::processEvents () from /usr/lib/qt/lib/libqt-mt.so.3
#10 0x412f5ba8 in QEventLoop::enterLoop () from /usr/lib/qt/lib/libqt-mt.so.3
#11 0x412f5a58 in QEventLoop::exec () from /usr/lib/qt/lib/libqt-mt.so.3
#12 0x412e3aa1 in QApplication::exec () from /usr/lib/qt/lib/libqt-mt.so.3
#13 0x08073713 in main (argc=2, argv=0xbffff524) at main.cpp:99
Comment 3 Thiago Macieira 2005-03-29 15:13:44 UTC
*** Bug 101722 has been marked as a duplicate of this bug. ***
Comment 4 Thiago Macieira 2005-03-29 16:51:41 UTC
Problem is in libxslt and has been filed upstream.

*** This bug has been marked as a duplicate of 100826 ***
Comment 5 Jes Hall 2005-03-30 03:57:19 UTC
Upgrading libxslt/libxml2 doesn't change the behaviour - and my original versions are the same as mattr is using without crashes. I sincerely doubt this is the problem.
Comment 6 Thiago Macieira 2005-04-06 02:43:08 UTC
*** Bug 103321 has been marked as a duplicate of this bug. ***
Comment 7 Thiago Macieira 2005-04-17 18:02:28 UTC
*** Bug 104058 has been marked as a duplicate of this bug. ***
Comment 8 Thiago Macieira 2005-04-17 18:06:16 UTC
The resolution for this bug is wrong.

Does anyone know what the proper resolution is? Is it fixed at all?
Comment 9 Jes Hall 2005-04-18 04:28:20 UTC
This bug seems fixed for me in CVS head right now, as of perhaps a week ago.
Comment 10 Olivier Goffart 2005-04-18 18:02:54 UTC
*** Bug 103072 has been marked as a duplicate of this bug. ***
Comment 11 Olivier Goffart 2005-04-18 18:03:41 UTC
*** Bug 103040 has been marked as a duplicate of this bug. ***
Comment 12 Thiago Macieira 2005-05-01 01:37:27 UTC
*** Bug 104871 has been marked as a duplicate of this bug. ***
Comment 13 Jan Ritzerfeld 2005-05-01 20:35:55 UTC
I'm getting similar backtraces on exit for irc:

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1105289344 (LWP 14134)]
[New Thread 1115225008 (LWP 25916)]
[Thread debugging using libthread_db enabled]
[New Thread 1105289344 (LWP 14134)]
[New Thread 1115225008 (LWP 25916)]
[Thread debugging using libthread_db enabled]
[New Thread 1105289344 (LWP 14134)]
[New Thread 1115225008 (LWP 25916)]
[KCrash handler]
#7  0x656d2064 in ?? ()
#8  0x4011b185 in ~Account (this=0x82c7940) at kopeteaccount.cpp:103
#9  0x401373cb in ~PasswordedAccount (this=0x82c7940)
    at kopetepasswordedaccount.cpp:47
#10 0x4295eb16 in ~IRCAccount (this=0x82c7940) at ircaccount.cpp:241
#11 0x413e5ccc in QObject::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#12 0x41382baf in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0x41384773 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0x41012e21 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#15 0x413839f0 in QApplication::sendPostedEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0x4139ab91 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0x4139a986 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0x4138463f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0x0806f7e7 in main (argc=2, argv=0xbffff1b4) at main.cpp:99
Comment 14 Olivier Goffart 2005-05-01 20:37:48 UTC
*** Bug 104920 has been marked as a duplicate of this bug. ***
Comment 15 Matt Rogers 2005-05-01 22:32:07 UTC
*** Bug 104871 has been marked as a duplicate of this bug. ***
Comment 16 Marco Aicardi 2005-05-16 17:48:02 UTC
I have the same problem, kopete *always* crashes when I quit.

All the rest of the program works fine.

Here is a report I have from the crash.

Regards.

Marco
 
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1238448384 (LWP 7790)]
(no debugging symbols found)
[KCrash handler]
#4  0x00000000 in ?? ()
#5  0xb7f3bfe8 in Kopete::Account::~Account () from /usr/lib/libkopete.so.1
#6  0xb7f508a7 in Kopete::PasswordedAccount::~PasswordedAccount ()
   from /usr/lib/libkopete.so.1
#7  0xb5d7efea in MSNAccount::~MSNAccount ()
   from /usr/lib/libkopete_msn_shared.so.0
#8  0xb69f4a4f in QObject::event () from /usr/lib/libqt-mt.so.3
#9  0xb699f370 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#10 0xb699e9d4 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#11 0xb6fa7960 in KApplication::notify () from /usr/lib/libkdecore.so.4
#12 0xb69a0077 in QApplication::sendPostedEvents ()
   from /usr/lib/libqt-mt.so.3
#13 0xb699ff0e in QApplication::sendPostedEvents ()
   from /usr/lib/libqt-mt.so.3
#14 0xb694b586 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#15 0xb69b074c in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#16 0xb69b060e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#17 0xb699f57b in QApplication::exec () from /usr/lib/libqt-mt.so.3
#18 0x0806f0ec in ?? ()
#19 0xbffff970 in ?? ()
#20 0xbffff950 in ?? ()
#21 0xbffff950 in ?? ()
#22 0x00000000 in ?? ()
#23 0x080bb04a in _IO_stdin_used ()
#24 0x00000001 in ?? ()
#25 0x080bc360 in _IO_stdin_used ()
#26 0x080bac26 in _IO_stdin_used ()
#27 0x080bac10 in _IO_stdin_used ()
#28 0x080babfc in _IO_stdin_used ()
#29 0x00000001 in ?? ()
#30 0xbffff968 in ?? ()
#31 0xb6e15ee0 in vtable for QGArray () from /usr/lib/libqt-mt.so.3
#32 0x082e57c8 in ?? ()
#33 0x0000000d in ?? ()
#34 0xb651be54 in ?? () from /usr/lib/libstdc++.so.5
#35 0xb6e15ee0 in vtable for QGArray () from /usr/lib/libqt-mt.so.3
#36 0x08112c58 in ?? ()
#37 0xbffff998 in ?? ()
#38 0xb64fa2ee in operator new () from /usr/lib/libstdc++.so.5
#39 0xb63248c8 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#40 0x0806ea91 in ?? ()
Comment 17 Olivier Goffart 2005-06-01 09:11:48 UTC
*** Bug 106584 has been marked as a duplicate of this bug. ***
Comment 18 Olivier Goffart 2005-06-01 10:42:45 UTC
SVN commit 420726 by ogoffart:

Backport the revision  408766 if kopeteprotocol.cpp

"Don't let the myself contact be deserialized, or it will conflict with the myself metacontact"
Well, there is no myself metacontact in branch, but it may conflict anyway with all the myself contacts.

This should fix Bug 102735: Kopete segmentation fault on unloading MSN plugin

BUG: 102735



 M  +12 -1     kopeteprotocol.cpp  


--- branches/KDE/3.4/kdenetwork/kopete/libkopete/kopeteprotocol.cpp #420725:420726
@@ -263,6 +263,16 @@
 			++( serializedDataIt.data() );
 		}
 
+		const QString& accountId=sd[ QString::fromLatin1( "accountId" ) ];
+		// myself was allowed in the contactlist in old version of kopete.
+		// But if one keep it on the contactlist now, it may conflict witht he myself metacontact.
+		// So ignore it
+		if(accountId == sd[ QString::fromLatin1( "contactId" ) ] )
+		{
+			kdDebug( 14010 ) << k_funcinfo << "Myself contact was on the contactlist.xml for account " << accountId << ".  Ignore it" << endl;
+			continue;
+		}
+
 		// FIXME: This code almost certainly breaks when having more than
 		//        one contact in a meta contact. There are solutions, but
 		//        they are all hacky and the API needs revision anyway (see
@@ -290,7 +300,7 @@
 		// (our our config is corrupted). Pick the first available account there. This
 		// might not be what you want for corrupted accounts, but it's correct for people
 		// who migrate from 0.6, as there's only one account in that case
-		if( sd[ QString::fromLatin1( "accountId" ) ].isNull() )
+		if( accountId.isNull() )
 		{
 			QDict<Account> accounts = AccountManager::self()->accounts( this );
 			if ( accounts.count() > 0 )
@@ -307,6 +317,7 @@
 			}
 		}
 
+		
 		Contact *c = deserializeContact( metaContact, sd, ad );
 		if (c) // should never be null but I do not like crashes
 			c->deserializeProperties( sd );
Comment 19 Olivier Goffart 2005-06-10 14:47:33 UTC
*** Bug 107152 has been marked as a duplicate of this bug. ***
Comment 20 Thiago Macieira 2005-07-03 05:08:15 UTC
*** Bug 108464 has been marked as a duplicate of this bug. ***
Comment 21 Thiago Macieira 2005-09-16 13:36:39 UTC
*** Bug 112718 has been marked as a duplicate of this bug. ***
Comment 22 Thiago Macieira 2005-11-23 12:20:09 UTC
*** Bug 116936 has been marked as a duplicate of this bug. ***