[kopete-bugs] [Bug 199580] New: Crash when disconnecting from WLM

Lamarque Vieira Souza lamarque at gmail.com
Thu Jul 9 18:20:23 CEST 2009


https://bugs.kde.org/show_bug.cgi?id=199580

           Summary: Crash when disconnecting from WLM
           Product: kopete
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: kopete-bugs at kde.org
        ReportedBy: lamarque at gmail.com


Version:            (using KDE 4.2.4)
Compiler:          gcc version 4.3.2 Gentoo 4.3.2-r3 p1.6, pie-10.1.5
OS:                Linux
Installed from:    Gentoo Packages

Sometimes Kopete crashes when disconnecting from WLM server. I think I have
found the cause, which seems a race condition in WlmServer::WlmDisconnect:

1    if (mainConnection)
2    {
3        disconnecting = true;
4        QListIterator<WlmSocket *> i(cb.socketList);
5        while (i.hasNext())
6        {
7            a = i.next();
8            QObject::disconnect (a, 0, 0, 0);
9            cb.socketList.removeAll (a);
10        }
11        cb.socketList.clear ();

12        if (mainConnection->connectionState () !=
13            MSN::NotificationServerConnection::NS_DISCONNECTED)
14        {
15            delete mainConnection;
16            mainConnection = NULL;
17        }
18    }

If WlmServer::WlmDisconnect is called twice in a really short time frame
between the if in line 1 and the delete in line 15 some time will passed and
the second run of WlmServer::WlmDisconnect will enter the if and delete
mainConnection object for a second time, which will cause Kopete to crash.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the kopete-bugs mailing list