Closed lannybroo closed 1 year ago
On Linux x86 with Java 21 and NetBeans 21, this bug does not happen. On Linux x86 with Java 11 and NetBeans 21, this bug does not happen.
Any chance you could try latest JDK 21, both aarch64 and amd64, on that Mac? Let's rule those variables out. The community installers have local Zulu 21 included if that's easier.
Any chance you could try latest JDK 21, both aarch64 and amd64, on that Mac? Let's rule those variables out. The community installers have local Zulu 21 included if that's easier.
I just now checked with Java JDK21 (Adoptium), and on both ARM (aarch64) and on Intel (amd64) JDKs I get the same problem. NetBeans runs fine otherwise.
Thanks! I've just checked with my own macOS machine used for building and testing the installers. Currently also macOS Sonoma 14.3.1 on aarch64 (ARM M1 Mac)
I cannot replicate this problem using the community installer or the ASF installer, with JDK 21 (Zulu or Temurin respectively).
Have you tried starting with a clean userdir and cache? Locations visible in NetBeans / About NetBeans
I found the source of the problem. It was interference from the application Pure Paste which is a background application that removes formatting from the clipboard. When I quit Pure Paste or turn off its Automatically Clear Formatting setting, NetBeans paste behaves normally again. I'll write up an FYI to the Pure Paste developer.
I think this bug can be closed unless you think there is something to be learned by engaging further. Not sure if other clipboard management tools could also cause similar issues.
Apache NetBeans version
Apache NetBeans 21
What happened
What happens is that I copy some text from some of my Java source code in the NetBeans editor using
⌘ C
(I'm on macOS Sonoma 14.3.1) then click somewhere else in the NetBeans editor and try to paste that code via⌘ V
. This first paste attempt fails every time. Nothing is pasted and the state of the editor window stays the same. If I watch carefully I see that theEdit
menu does flash during this first paste as it does when running any keyboard command that is also in the menu in NetBeans. If I then try pasting a second time via⌘ V
, the paste succeeds. I can then paste over an over again and each subsequent paste succeeds until I copy something new.What I expect to happen is for paste to always work.
The problem also occurs in the same way if you use the
Edit > Copy
thenEdit > Paste
menu commands instead of keyboard shortcuts.The problem does not occur if you copy text from a different application (not NetBeans) and then paste into Netbeans. In this situation, the first paste into NetBeans succeeds.
I do not think this is related to existing open copy/paste issues such as #3962 or #5948.
Language / Project Type / NetBeans Component
No response
How to reproduce
Did this work correctly in an earlier version?
No / Don't know
Operating System
macOS Sonoma 14.3.1 on aarch64 (ARM M1 Mac)
JDK
11.0.17; OpenJDK 64-Bit Server VM 11.0.17+8-LTS (Zulu aarch64 JDK)
or
21.0.2; OpenJDK 64-Bit Server VM 21.0.2+13-LTS (Adoptium, aarch64 or 86 version of JDK)
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
This happens every time when copying from within NetBeans, as described above.
I'd be happy to help test/debug any fix ideas but I am too unfamiliar with this code base to work up a PR at this time.
I also grabbed a snip of an exception I see in
View > IDE Log
after the 2nd paste (that succeeds). Interesting I didn't see this exception after the 1st (failing) paste:Are you willing to submit a pull request?
No