> On 2009-07-10 13:11:54, Tiago Salem Herrmann wrote:
> > how many times were you able to reproduce this crash?
> > What was the interval between the two offline status requests?
> > I'm not sure if a race condition can happen here, because as far as I know 
> > there are no threads running in this part of the code, and as the 
> > mainConnection is erased and deleted, in the second run the 
> > if(mainConnection) would prevent that situation.

After the first time it happened everytime I logoff it happens. I do not why it 
started to happen only this week. Both WlmAccount::slotGoOffline and 
WlmAccount::~WlmAccount call WlmAccount::disconnect, which calls 
WlmAccount::logOff, which calls WlmServer::WlmDisconnect. if the first run of 
WlmServer::WlmDisconnect takes too long before the "delete mainConnection" the 
second run can cause the crash.


- Lamarque


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/972/#review1539
-----------------------------------------------------------


On 2009-07-09 12:01:45, Lamarque Souza wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/972/
> -----------------------------------------------------------
> 
> (Updated 2009-07-09 12:01:45)
> 
> 
> Review request for Kopete.
> 
> 
> Summary
> -------
> 
> 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 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.
> 
> 
> This addresses bug 199580.
>     https://bugs.kde.org/show_bug.cgi?id=199580
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdenetwork/kopete/protocols/wlm/wlmserver.h 993925 
>   /trunk/KDE/kdenetwork/kopete/protocols/wlm/wlmserver.cpp 993925 
> 
> Diff: http://reviewboard.kde.org/r/972/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Lamarque
> 
>

_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to