Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 394537 - Clipboard copy paste issues on Linux / KDE / Klipper
Summary: Clipboard copy paste issues on Linux / KDE / Klipper
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-18 15:52 EST by Andrei ILIE CLA
Modified: 2018-12-18 10:25 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei ILIE CLA 2012-11-18 15:52:32 EST
When launching Eclipse from KDE, one might experience several types failures with cut, copy and paste actions in Eclipse Web Page Editor. The reported misbehavior is non-deterministic, but frequent enough to degrade user experience.

Inside the editor, specially the Web Page Editor, selecting text and issuing the copy action (ctrl+c or equivalent menu entry) may not copy the select text to the clipboard. The cut action (ctrl+x or equivalent menu entry) erases the selected text as expected, but may not save to clipboard (text that was cut is lost!). Sometimes, paste only writes part of the expected text, other part of the text are lost.

Copy & paste never fails on text boxes in dialogs. It fails only on text editors, especially Web Page Editor.


Esben Mose Hansen, Klipper sort-of-maintainer, said on Sep 2009:
"It is most probably because Eclipse is one of the programs that empties the clipboard before claiming it. If that is case, the best solution would be for Eclipse to stop doing that… at best, it is unnecessary chatter via. the X protocol. It might also introduce a race condition, especially in these multicore days, as you probably see with Klipper here."


These reports may be related:
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=97557
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=192561
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=200743


Temporary workarounds:
  1. In eclipse, press Ctrl+C twice.
  2. Disable the Klipper’s "Prevent empty clipboard" setting.
  3. Disable Klipper.
Comment 1 Xi Yan CLA 2018-11-30 17:12:29 EST
Is this still reproducible?
Comment 2 Chris Ward CLA 2018-12-12 04:41:26 EST
I have a problem with these symptoms with Eclipse Photon 4.8.0 under RedHat Enterprise Linux 7.5 (gnome), using the C/C++ IDE. Sometimes cut/copy and paste doesn't work; 'cut' always deletes the text, but 'paste' sometimes pastes the previous contents of the buffer. Undoing with Ctrl-Z and redoing the cut/copy causes correct behaviour.
Comment 3 Xi Yan CLA 2018-12-14 09:50:27 EST
(In reply to Chris Ward from comment #2)
> I have a problem with these symptoms with Eclipse Photon 4.8.0 under RedHat
> Enterprise Linux 7.5 (gnome), using the C/C++ IDE. Sometimes cut/copy and
> paste doesn't work; 'cut' always deletes the text, but 'paste' sometimes
> pastes the previous contents of the buffer. Undoing with Ctrl-Z and redoing
> the cut/copy causes correct behaviour.

Can you try with the a latest I-build?
https://download.eclipse.org/eclipse/downloads/
Comment 4 Chris Ward CLA 2018-12-14 11:08:40 EST
I have downloaded and installed the version of Eclipse you asked for. Is it possible to get the C/C++ tooling for use with that level ?

On initial use, this latest Eclipse does not seem to resolve the problem.
Comment 5 Xi Yan CLA 2018-12-14 12:40:32 EST
(In reply to Chris Ward from comment #4)
> I have downloaded and installed the version of Eclipse you asked for. Is it
> possible to get the C/C++ tooling for use with that level ?
> 
> On initial use, this latest Eclipse does not seem to resolve the problem.

You can install CDT using p2 repo: https://download.eclipse.org/tools/cdt/releases/9.5/

Does the problem also happen without Klipper? And the issue here is that ctrl+x and ctrl+v doesn't paste the correct content into the editor?
Comment 6 Chris Ward CLA 2018-12-14 15:17:51 EST
The problem happens for me with GNOME (under RHEL 7.5), so klipper is not in use. Yes, the problem is with Ctrl-X and Ctrl-V not pasting the right text in eclipse; usually it pastes blank text.
Comment 7 Chris Ward CLA 2018-12-17 06:18:48 EST
On further testing, the issue seems resolved or at least greatly improved by the latest eclipse. Is there any change you know about which should fix this issue ?
Comment 8 Xi Yan CLA 2018-12-17 15:05:31 EST
(In reply to Chris Ward from comment #7)
> On further testing, the issue seems resolved or at least greatly improved by
> the latest eclipse. Is there any change you know about which should fix this
> issue ?

I'm not sure which change fixed the issue, I tried bisecting but cannot reproduce the issue with the java editor in 4.8. Is the issue fully resolved for you now?
Comment 9 Andrey Loskutov CLA 2018-12-17 15:22:36 EST
We are heavy CDT/KDE/Eclipse/RHEL users since many years and I know about exact zero cases reported against 4.7.2 and 4.9.0. I'm speaking about ~50 full time developers using IDE and a lot of customers using the product based on same platform. I can hardly imagine such bug would remain not reported, if it would be something basic. However there were lot of cases in the past where using Eclipse over x11vnc corrupted the clipboard in Eclipse, see bug 205678.

I would recommend to close this bug and create a new one, if the issue schould appear again - with exact description of the environment where it was observed and with logs, exact software versions involved etc.
Comment 10 Chris Ward CLA 2018-12-17 15:26:47 EST
Yes, it is fully resolved for me now.
Comment 11 Xi Yan CLA 2018-12-18 10:25:51 EST
Thanks Andrey and Chris for the feedback! Closing the ticket as per comment #9 and #10. Please open a new one if the issue occurs.