Bug 206159 - Duplicate IMs received for yahoo messenger
Summary: Duplicate IMs received for yahoo messenger
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Yahoo Plugin (show other bugs)
Version: 0.70.90
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-03 19:56 UTC by Hrishikesh Mehendale (हृषीकेश मेहेंदळे)
Modified: 2011-01-30 01:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.1
Sentry Crash Report:


Attachments
duplicate messages in yahoo msgr (34.70 KB, image/png)
2009-09-03 20:02 UTC, Hrishikesh Mehendale (हृषीकेश मेहेंदळे)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hrishikesh Mehendale (हृषीकेश मेहेंदळे) 2009-09-03 19:56:10 UTC
Version:           0.70.90 (using KDE 4.3.0)
OS:                Linux
Installed from:    Ubuntu Packages

I upgraded to the latest kde (as of today) in kubuntu 9.04 64-bit, after which I see all incoming yahoo messenger IMs in duplicate.

This does not happen for our internal XMPP (running ejabberd) server, nor for google talk.

(screenshot attached)

Kopete reports "Version 0.70.90 using KDE 4.3.1"
Comment 1 Hrishikesh Mehendale (हृषीकेश मेहेंदळे) 2009-09-03 20:02:26 UTC
Created attachment 36667 [details]
duplicate messages in yahoo msgr
Comment 2 Robert Voinea 2009-12-14 09:45:05 UTC
This happens for me too but for yahoo contacts only and not always, but from time to time.
It goes away after a status change online -> offline -> online.

I think it has to do with the "auto-reconnect" feature.

I have two workstations one with Kubuntu 9.10 (KDE 4.3.2) and one with Gentoo (KDE 4.3.4).
Comment 3 cristi.posoiu 2011-01-29 12:56:11 UTC
Happens to me too, sometimes. Seems to be only when the other party is a Windows YM.
Problem clears indeed if going offline, then online.

It shouldn't have something to do w/ the reconnect thing but rather w/ sometimes YM wanting a receive acknowledge message back. I see other libraries are having such a feature implemented, though not working everytime either: http://developer.pidgin.im/ticket/11722

kopete 1.0.80, kde 4.6 rc2.
Comment 4 cristi.posoiu 2011-01-29 13:30:57 UTC
err.. wait.. while the thing w/ ACK messages is true, I looked again in the log I'm having. Looks like on the same message, the same signal is generated twice.
I am already seeing something wrong in the code. So...err.. maybe the auto-reconnect might be the problem in here.
Especially since I remember I've seen the message doubled w/ the *same* timestamp, while the 2nd message sent by windows YM when not receiving an ACK is sent after ~7 seconds - as people said in other bug reports.
Stay tuned :-)
Comment 5 cristi.posoiu 2011-01-29 16:58:30 UTC
I pushed a patch to be reviewed - there are problems handling login problems to yahoo which can get you into receiving duplicate messages at next successful connect.
Note though that this is only for the case where you see the duplicate messages in the same time, *not* some 7 seconds apart.
Comment 6 Raphael Kubo da Costa 2011-01-30 01:30:00 UTC
SVN commit 1217959 by rkcosta:

yahoo protocol: Disconnect signals when login fails.

From the original ReviewBoard description:

  Basically, sometimes, kopete is displaying in duplicate incoming
  messages.  Checking my log, I saw the following:

  a) yahoo wasn't actually sending the message in duplicate.
  b) but YahooACcount::slotGotIm() was called twice on that message
  c) somewhere before the problematic thing - and I actually saw many
  things being done in duplicate (not just messages), I saw this:

    kopete(8352)/kopete (yahoo - raw protocol)
    Client::slotLoginResponse: Emitting loggedIn

    kopete(8352)/kopete (yahoo) YahooAccount::slotLoginResponse: -1 ,
    "" )]

  d) checking code in yahooaccount.cpp - it seems that for that code
  (and others), it considers that account is offline, but forgets to
  also disconnect all the signals. So, next time user logins (even by
  an auto-reconnect), the signals are connected *again* to the same
  sources. And that's why it gets to do things 2 times.

This commit contains the disconnection code without the message box
part, which includes new strings and will be committed only to trunk.

Original patch by Cristi Posoiu <cristi.posoiu AT gmail>, thanks!

REVIEW: 6421
BUG: 206159
FIXED-IN: 4.6.1



 M  +1 -0      yahooaccount.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1217959
Comment 7 Raphael Kubo da Costa 2011-01-30 01:32:09 UTC
SVN commit 1217960 by rkcosta:

yahoo protocol: Disconnect signals when login fails.

From the original ReviewBoard description:

  Basically, sometimes, kopete is displaying in duplicate incoming
  messages.  Checking my log, I saw the following:

  a) yahoo wasn't actually sending the message in duplicate.
  b) but YahooACcount::slotGotIm() was called twice on that message
  c) somewhere before the problematic thing - and I actually saw many
  things being done in duplicate (not just messages), I saw this:

    kopete(8352)/kopete (yahoo - raw protocol)
    Client::slotLoginResponse: Emitting loggedIn

    kopete(8352)/kopete (yahoo) YahooAccount::slotLoginResponse: -1 ,
    "" )]

  d) checking code in yahooaccount.cpp - it seems that for that code
  (and others), it considers that account is offline, but forgets to
  also disconnect all the signals. So, next time user logins (even by
  an auto-reconnect), the signals are connected *again* to the same
  sources. And that's why it gets to do things 2 times.

Forwardport of r1217959, with the string additions.

Original patch by Cristi Posoiu <cristi.posoiu AT gmail>, thanks!

CCBUG: 206159


 M  +3 -0      yahooaccount.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1217960
Comment 8 Raphael Kubo da Costa 2011-01-30 01:36:43 UTC
SVN commit 1217961 by rkcosta:

Mention Kopete's bug 206159.

CCBUG: 206159


 M  +1 -0      changelog_branch_4_6.xml  


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