Copy/Paste/Clipboard not working as expected on Kubuntu 16.04 LTS with PHPStorm 2016.3

Answered

Had a working installation of PHPStorm 2016.3 on my Kubuntu 14.04 LTS. When I upgraded to Kubuntu 16.04 LTS I experienced the following issue.

1) I cannot paste any text with the standard Ubuntu Clipboard to PHPStorm (so Ctrl-C from any non-PHP-Storm with a Ctrl-V to PHPStorm does not work).

2) I can paste any text with the 2nd standard Ubuntu Clipboard to PHPStorm (so marking a text anywhere and using the middle mouse button to paste in PHPStorm is working.

3) Since I changed 'Copy as rich-text by default' to false in Settings I can copy & paste within PHPStorm (by CTR-C/V) - before that I was only able to paste within PHPStorm when I used the 'Paste as plain text' whenever a right-click context menu was available.

What I tried so far:

1) Checked all shortcuts (both within Ubuntu as well PHPStorm) - nothing changed here.

2) I replaced the OpenJDK by the Oracle 8 JDK as I read in a couple of postingst that those issues might be related to the used Java binaries.

What can/should I do? Because using an IDE without an intuitive Copy/Paste is a real pain!

10 comments
Comment actions Permalink

Hello, similar issue was reported here: https://youtrack.jetbrains.com/issue/IDEA-158906

From comments:

 

On Linux there are usually two 'slots' in clipboard - one is accessed via Ctrl+C/Ctrl+V, another is automatically populated when text selection is performed, and pasted on middle mouse button click. Looks like on your system those two 'slots' got mixed. Do you have any third-party plugins installed in IDE, or any clipboard manager software installed on your system?
 
 
You can check if there are any custom plugins by going to File | Settings | Plugins and selecting Show: Custom

 

0
Comment actions Permalink

Thanks, I don't have any additional clipboard managers installed (would have been my first guess then as well).

Regarding custom plugins yes, I got a few - which worked perfectly under Ubuntu 14.04 LTS. And I don't see how they should affect any clipboard functionality (e.g. Symfony plugin, Bash Support etc.) But anyway:

What is your recommendation? Disable/uninstall them one by one to see which could cause the issue?

0
Comment actions Permalink

You can try to just disable all "Custom" plugins, restart IDE and check if this helps.

But looks like the issue is not with plugins. It would be great if you could restart IDE, reproduce the issue and send us (upload somewhere) idea.log file (Help > Show log in ...).

 

There's also a test you can perform here: https://youtrack.jetbrains.com/issue/IDEA-78729#comment=27-280348

0
Comment actions Permalink

Ah, you're right. It's the same log message (not depending whether I use the bundled or the Oracle JDK) as mentioned in the other ticket :-(

2017-01-25 15:19:15,831 [ 47580] WARN - llij.ide.ClipboardSynchronizer - Java bug #6322854
java.lang.NullPointerException: Failed to retrieve atom name.
at sun.awt.X11.XlibWrapper.XGetAtomName(Native Method)
at sun.awt.X11.XAtom.getName(XAtom.java:186)
at sun.awt.X11.XDataTransferer.getTargetNameForAtom(XDataTransferer.java:165)
at sun.awt.X11.XDataTransferer.getNativeForFormat(XDataTransferer.java:154)
at sun.awt.datatransfer.DataTransferer.getFlavorsForFormats(DataTransferer.java:677)
at com.intellij.ide.ClipboardSynchronizer$XWinClipboardHandler.a(ClipboardSynchronizer.java:407)
at com.intellij.ide.ClipboardSynchronizer$XWinClipboardHandler.areDataFlavorsAvailable(ClipboardSynchronizer.java:331)
at com.intellij.ide.ClipboardSynchronizer.areDataFlavorsAvailable(ClipboardSynchronizer.java:99)
at com.intellij.ide.CopyPasteManagerEx.areDataFlavorsAvailable(CopyPasteManagerEx.java:77)
at com.intellij.ide.CopyPasteManagerEx.getContents(CopyPasteManagerEx.java:244)
at com.intellij.openapi.application.ex.ClipboardUtil.getTextInClipboard(ClipboardUtil.java:27)
at com.intellij.openapi.application.ClipboardAnalyzeListener.applicationDeactivated(ClipboardAnalyzeListener.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:381)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:368)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:347)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:42)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:230)
at com.sun.proxy.$Proxy57.applicationDeactivated(Unknown Source)
at com.intellij.ide.ApplicationActivationStateManager.updateState(ApplicationActivationStateManager.java:94)
at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:806)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:568)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:391)
at java.awt.SentEvent.dispatch(SentEvent.java:70)
at java.awt.DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent.dispatch(DefaultKeyboardFocusManager.java:217)
at java.awt.DefaultKeyboardFocusManager.sendMessage(DefaultKeyboardFocusManager.java:244)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:755)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.java:27)
at java.awt.Component.dispatchEventImpl(Component.java:4760)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:843)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:679)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:391)
at java.awt.SequencedEvent.dispatch(SequencedEvent.java:128)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:843)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:679)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:391)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

0
Comment actions Permalink

Thanks! I believe it's better to proceed to a corresponding report thread: hopefully developers would be able to suggest something here.

0
Comment actions Permalink

how do I do that? submitting a new support request instead of this community posting?

0
Comment actions Permalink

You can sign up at https://youtrack.jetbrains.com/issue/IDEA-78729 and comment there the issue you've faced. Our developers would most likely request a full idea.log file with:

1) bundled JDK

2) fresh IDE restart + actions that reproduces the issue

0
Comment actions Permalink

Awesome! I'll be watching this issue

0
Comment actions Permalink

Obviously reinstalling xsel in its 32bit version did the trick for me. Ugly thing.

1

Please sign in to leave a comment.