Bug 271277 - Skype plugin duplicates messages in conferences
Summary: Skype plugin duplicates messages in conferences
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: Skype Plugin (show other bugs)
Version: 1.0.80
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Pali Rohár
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-19 09:32 UTC by Radosław Jan Ganczarek
Modified: 2013-06-22 06:39 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11


Attachments
Patch for reverting revision 1133818 (12.25 KB, patch)
2012-03-12 13:37 UTC, Pali Rohár
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radosław Jan Ganczarek 2011-04-19 09:32:19 UTC
Version:           1.0.80 (using KDE 4.6.2) 
OS:                Linux

In a conference with skype contacts every message I write is displayed two times. Messages sent by other users are not duplicated.

Reproducible: Always

Steps to Reproduce:
Open a chat window with several skype users (in one to one chat it's all ok) and type a message.

Actual Results:  
Message is displayed in chat window two times.

Expected Results:  
Message is displayed only once.
Comment 1 Alexander 2011-05-26 18:45:42 UTC
I suffer from this, too. KDE 4.6.80 but in 4.6 I've had the same. The strange thing is that it happens not for all my skype contacts. And also for me it happens and in one to one chats.
Comment 2 Alexander 2011-05-31 23:54:45 UTC
even if I'll open native skype chat window and send message from it, kopete still display duplicates.
Comment 3 Juan Luis Baptiste 2011-06-04 21:00:40 UTC
Also happens with kopete version from KDE 4.5.5, but I don't remember having this problem with skype 2.1.0.81, just since I upgraded to 2.2.0.25.
Comment 4 gurnaikv 2011-06-23 12:43:50 UTC
This is happening for me in KDE 4.6.4 (64bit): duplicate messages even in one-to-one Skype (2.2.0.35) chats.
Comment 5 act28 2011-07-08 02:05:20 UTC
Same issue, intermittently double posts same chat message, when using kopete chat window for Skype chat.  

openSUSE 11.4, Kopete 1.0.80 (KDE 4.6.0), Skype 2.2.0.35 dynamically linked version.
Comment 6 Pali Rohár 2011-08-13 12:17:49 UTC
I think that problem appeared in this commit:
http://websvn.kde.org/?view=revision&revision=1133818

Can somebody compile and try Kopete before this commit?
Comment 7 Richard Homonnai 2011-08-17 11:02:55 UTC
Okay, will try to :)
Comment 8 Pali Rohár 2011-11-14 20:00:45 UTC
@Richard Homonnai:
Did you tried it?
Comment 9 Richard Homonnai 2011-11-14 22:20:47 UTC
Didn't have any luck. I kind of destroyed my Qt and stopped than, after that I forgot about it. So let's try again. :)
Comment 10 Richard Homonnai 2011-11-15 01:10:43 UTC
could someone please tell me the command to check out the right revision? Due to the Git migration I cannot find any information it seems...
Comment 11 Pali Rohár 2011-11-15 07:19:10 UTC
kopete is still on svn. command to checkout revision before 1133818:
$ svn co -r 1133817 svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork/kopete
Comment 12 Pali Rohár 2011-11-27 20:23:37 UTC
CCing Benson Tsai, author of patch in commit 1133818.

@Benson Tsai:
Can you test if you have this problem too?

@Richard Homonnai:
Did you tested kopete version before 1133818?
Comment 13 Richard Homonnai 2011-11-28 22:56:00 UTC
(In reply to comment #12)
> @Richard Homonnai:
> Did you tested kopete version before 1133818?

Hi,

I tried. a lot. But I just cannot compile it, using KDE 4.7.3.
I am getting compile errors over and over.

I seem to have fixed these now (it was about visibility) but now I have problems about videodev.h, which seems to be named otherwise on my system.

In short, I am working on it :)
Comment 14 Pali Rohár 2012-03-06 06:53:13 UTC
@Richard Homonnai:
Any news?
Comment 15 Richard Homonnai 2012-03-08 10:05:10 UTC
(In reply to comment #14)
> @Richard Homonnai:
> Any news?

Hi, Sorry, I tried it multiple times, it's not easy to build unfortunately. Yesterday I started again from scratch. I have almost built it. But now I get headaches about videodev.h in libkopete - is there a way to exclude video devices also?
Comment 16 Pali Rohár 2012-03-08 21:39:08 UTC
For disabling video use cmake param DISABLE_VIDEOSUPPORT
cmake -DDISABLE_VIDEOSUPPORT=ON
Comment 17 Richard Homonnai 2012-03-12 11:50:28 UTC
Thank you that worked. I have Kopete built now. So far, no duplicate messages. Trying for a few days... (using it instead of the new Kopete in 1.1.3, this is 1.0.80)
Comment 18 Pali Rohár 2012-03-12 13:37:15 UTC
Created attachment 69536 [details]
Patch for reverting revision 1133818

Ok, so if you are using kopete rev. 1133817 and there is no problem with duplicate messages, can you also try to last kopete from svn without patch introduced in revision 1133818? I attached patch against kopete trunk which revert revision 1133818. Apply it with patch -p2 -i <file>
Comment 19 Richard Homonnai 2012-03-14 00:36:53 UTC
Unfortunately, no. I was chatting with the 1133817 revision the whole day, didn't get a single duplicated line, so I tried trunk + patch - it did work for a long while. And then it happened again. However, in the last updates the duplicate messages were getting less it seems. I looked through my logs. When I posted my first reply, almost every message I sent was duplicated. By now, only single ones - maybe some race condition.

I will now revert to 1133817 - and tell you if it is still happening. As it seems, this commit is not the bad boy itself.
Comment 20 Richard Homonnai 2012-03-15 02:27:35 UTC
No, the old version seems to have the same effect. It just happens from time to time. It's hard to track because at most times it seems to work now. Also, there is nothing visible, even with all debug output turned on. It's just... strange. It worked for like 6 hours, nothing happened. And then, out of nowhere, it started again. and it also stopped, just like it started. I really have no clue what it is. But it does not seem to make any difference whether the patch is there or not (maybe the probability of getting duplicates is different, though).

Tomorrow I'll try it with the 4.7.4 version again and see if there are more occurences.
Comment 21 j_kanev 2013-03-06 10:21:48 UTC
Additional information (on debian sid):

Message duplicating happens in 80% of cases, with no apparent cause.
Message duplicating is independent of number of participants (happens in one-one chats as well).
In Kopete window only my messages are duplicated, not those of the other participant(s).
Kopete history plugin shows my messages duplicated as well.
Skype history (opened in skype directly) shows messages from the same chant non-duplicated.
Comment 22 Pali Rohár 2013-06-07 23:48:45 UTC
Git commit 0a53d7868b057e1b4d5a3f10a6115ce82e3bbfa2 by Pali Rohár.
Committed on 07/06/2013 at 23:05.
Pushed by pali into branch 'master'.

Fix skype protocol code which was incorrectly ported to KDE4

* Fix some missing calls to trimmed() string function
* Fix incorrect handling of duplicate skype messages

* This is propably root problem of bug 271277

M  +7    -7    protocols/skype/libskype/skype.cpp
M  +1    -1    protocols/skype/skypeaccount.cpp

http://commits.kde.org/kopete/0a53d7868b057e1b4d5a3f10a6115ce82e3bbfa2
Comment 23 Pali Rohár 2013-06-07 23:53:13 UTC
@j_kanev, @Richard: Can you test if this bug still occured?
Comment 24 Richard Homonnai 2013-06-08 00:30:03 UTC
It is still very real, and very annoying, and hard to pinpoint.

I will try your patch against 4.10.3 the next days :)
Comment 25 Richard Homonnai 2013-06-21 11:24:23 UTC
The patch applied cleanly with Kopete 4.10.3 (using gentoo with userpatches) testing it now for a few days. It might take a while because this just happens (or happened) sometimes...
Comment 26 Richard Homonnai 2013-06-21 20:36:07 UTC
Actually... this patch seems to fix quite some more of my skype problems, in particular, that some messages are never displayed in Kopete, when I receive them in Skype. Sending takes longer instead of being instantly shown - I guess this is because Skype does not acknowledge the receipt of it. This is quite fine for me however.

I think I never reported that bug, but I will search for it. No groupchat so far, so I will have to wait for the other issue though.
Comment 27 Pali Rohár 2013-06-21 20:43:11 UTC
Ok, so is git commit 0a53d7868b057e1b4d5a3f10a6115ce82e3bbfa2 fixing this bug?

Also note that kopete skype plugin supports only skype client 2.x versions (old and new could not work correctly).
Comment 28 Richard Homonnai 2013-06-21 22:48:50 UTC
It seems to be fixed. The sending delay vanished a reboot later, but not important for this bug.

I am using Skype 4.2.0.11 by the way, it does not give me any real problems. Just sometimes it needs to long for startup, and the plugin times out. But a reconnect fixes that. Sometimes I get no contacts, sometimes not all of them, but again a reconnect fixes that. Just for a short notice. Oh, and DON'T use the button to set the preferences of Skype. It won't start until you delete your XML file.

I will watch for the duplication for some time and report it, if it happens. So far, all is good.
Comment 29 Pali Rohár 2013-06-22 06:39:19 UTC
Ok, if this duplicate messages bug returns back, reopen it. Now I close it as fixed.

That button for setting preferences is for Skype 2.x, so it is normal that for new 4.x not working...