Bug 473456 - Klipper has mixed up the order of clipboard history with KDE Connect clipboard sync active
Summary: Klipper has mixed up the order of clipboard history with KDE Connect clipboar...
Status: REOPENED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (other bugs)
Version First Reported In: master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Leart Turely
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-16 16:04 UTC by Leart Turely
Modified: 2024-07-22 21:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
problem reappears (3.75 MB, image/gif)
2023-08-24 06:17 UTC, Leart Turely
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leart Turely 2023-08-16 16:04:32 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https:community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1. copy text or other items. like this: "1", ... (nothing goes wrong. )
2. copy again. And you see that the "current" become a "previous".  like this:"1", "2", ... (it should be "2", "1", ...)
3. copy again. like this: "3", "1", "2", ... (nothing goes wrong again. )
4. copy again. like this: "3", "4", "1", "2", ... (wrong!)
5. ...


OBSERVED RESULT
It takes copying twice in succession to copy the correct content.

EXPECTED RESULT
Only one copy is needed.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Archlinux / KDE
(available in About System)
KDE Plasma Version: 5.27.7 
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
None
Comment 1 Nate Graham 2023-08-17 19:18:41 UTC
Are you using X11 or Wayland?

Can you attach a screen recording that shows the problem happening?
Comment 2 Leart Turely 2023-08-23 02:17:41 UTC
(In reply to Nate Graham from comment #1)
> Are you using X11 or Wayland?
> 
> Can you attach a screen recording that shows the problem happening?

the problem happened on both X11 & Wayland, and it happend just in a not long time after system started. 

but these days (17/8/23 - 23/8/23) I dont see the problem anymore, so I cant record. 

if the problem happens again I'll add an attachment.

I think it may be not a KDE bug? but a mem problem? I have no idea.
Comment 3 Leart Turely 2023-08-23 02:20:05 UTC
(In reply to Nate Graham from comment #1)
> Are you using X11 or Wayland?
> 
> Can you attach a screen recording that shows the problem happening?

the problem happened on both X11 & Wayland, and it happend just in a not long time after system started. 

but these days (17/8/23 - 23/8/23) I dont see the problem anymore, so I cant record. 

if the problem happens again I'll add an attachment.

I think it may be not a KDE bug? but a mem problem? I have no idea.(In reply to Leart Turely from comment #2)
> (In reply to Nate Graham from comment #1)
> > Are you using X11 or Wayland?
> > 
> > Can you attach a screen recording that shows the problem happening?
> 
> the problem happened on both X11 & Wayland, and it happend just in a not
> long time after system started. 
> 
> but these days (17/8/23 - 23/8/23) I dont see the problem anymore, so I cant
> record. 
> 
> if the problem happens again I'll add an attachment.
> 
> I think it may be not a KDE bug? but a mem problem? I have no idea.

I mean this problem only happens for a while after system boot, after that this problem will disappear.
Comment 4 Nate Graham 2023-08-23 15:47:31 UTC
Ok, thanks! Feel free to re-open this if it happens again.
Comment 5 Leart Turely 2023-08-24 06:17:54 UTC
Created attachment 161149 [details]
problem reappears

The text should be on top of the stack, but sometimes it isn't as you can see. The pasted content is always the content on top of the stack, so sometimes the wrong text is pasted.
Comment 6 tribute2pantera 2024-07-01 08:22:05 UTC
I'm not sure if it's still been 'reopened' but I haven't seen it until upgrading to 6.1.1.

I cannot reproduce it with a "clean" virtual machine though.
I assume KDE Connect synchronizing the clipboard might be a thing here.
Comment 7 tribute2pantera 2024-07-02 06:57:37 UTC
(In reply to tribute2pantera from comment #6)
> I'm not sure if it's still been 'reopened' but I haven't seen it until
> upgrading to 6.1.1.
> 
> I cannot reproduce it with a "clean" virtual machine though.
> I assume KDE Connect synchronizing the clipboard might be a thing here.

I was wrong. Sorry for the noise.
I rolled back Plasma to 6.1.0 but the problem persists.
It must be something else who messes with the clipboard.
Comment 8 Leart Turely 2024-07-11 03:32:41 UTC
(In reply to tribute2pantera from comment #6)
> I'm not sure if it's still been 'reopened' but I haven't seen it until
> upgrading to 6.1.1.
> 
> I cannot reproduce it with a "clean" virtual machine though.
> I assume KDE Connect synchronizing the clipboard might be a thing here.

I believe it is indeed caused by KDE Connect. 

To be honest, I am not sure how their synchronization mechanism works. Over the past year, I only had one laptop, so I haven't encountered this issue during that time. Recently, I moved to a new place where I have an additional desktop computer, and the problem reappeared. 

But it's true that : 

When I unpaired in KDE Connect, the issue disappeared immediately. 

However, it might be necessary to manually send the clipboard to reproduce the issue after reconnecting.

PS: 
Both of two devices is:
> Operating System: Arch Linux 
> KDE Plasma Version: 6.1.2
> KDE Frameworks Version: 6.3.0
> Qt Version: 6.7.2
> Kernel Version: 6.9.8-arch1-1 (64-bit)
> Graphics Platform: Wayland
> KDE Connect: 24.05.2 build with Qt 6.7.1 (installed by pacman)