This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Copy/Paste retains old clipboard data | ||
---|---|---|---|
Product: | editor | Reporter: | freshbiology |
Component: | Actions/Menu/Toolbar | Assignee: | Milutin Kristofic <mkristofic> |
Status: | NEW --- | ||
Severity: | normal | CC: | alburnett, BobSpeck, Geoff_C, kkonnou, markiewb, N3T, ovrabec, toddjspin, vlad_konov, vv159170 |
Priority: | P1 | Keywords: | 8.1_WAIVER_APPROVED |
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Windows 10 x64 | ||
See Also: | https://netbeans.org/bugzilla/show_bug.cgi?id=88161 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Log of switching to Netbeans and trying to paste data
Log of fixing issue temporarily by doing some copying in Netbeans screencap and log files |
Description
freshbiology
2014-08-04 13:01:13 UTC
Can you please provide more info? Is there any exception in the messages.log? Does it happen always of is it just random? What type of data are you trying to copy? (from which application) Thanks (In reply to Jiri Prox from comment #1) > Can you please provide more info? > Is there any exception in the messages.log? > Does it happen always of is it just random? > What type of data are you trying to copy? (from which application) > > Thanks Hi I mainly use IDE for Java development. I was trying to paste java code snippet from Notepad++. It happened just once. There was no error or exception. The IDE was running smoothly but it won't accept windows clipboard data. The IDE did not become unstable. It retained the data of it's own copy (Ctrl+C) command within the IDE. Finally I had to restart the IDE and it started working normally. Since then I did not get this sort of problem. When it happened, I searched the web for any possible reason. I found that a bug of somewhat similar kind was reported in a previous version of the IDE which was fixed. I considered it appropriate to report it, in case it might be a real bug. The same problem for me, actually really frustrating! It stops working occasionally, in most cases it happens when you urgently need to copy and paste. Only IDE restart helps. Product Version: NetBeans IDE 8.0 (Build 201403101706) Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 2 Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b17 System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb) Even worse for Product Version: NetBeans IDE 8.0.1 (Build 201408251540) Java: 1.7.0_67; Java HotSpot(TM) 64-Bit Server VM 24.65-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01 System: Windows 8 version 6.2 running on amd64; Cp1252; en_GB (nb) Have to restart IDE several times per day... This happened for me too, but I don't know how to reproduce. I had to do some random copy&pasting inside Netbeans before paste started to work again (i.e. no restart was needed). This is not a new problem, but quite infrequent (for me). Product Version: NetBeans IDE 8.0.1 (Build 201408251540) Updates: Updates available to version NetBeans 8.0.1 Patch 1.1 Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) ... and I was trying to copy a URL from Opera's address bar to Netbeans' Java editor. Today again I was unable to paste windows clipboard data into Netbeans Java Editor. Restart did help but after a while the IDE refused to accept clipboard data from outside the IDE. It would retain its own Cut/Copy data. I had to restart the IDE a few times. I am using Netbeans 8.0.2, JDK1.8.0_05, Windows 7 Ultimate x64, Core i5, 8GB RAM. I have noticed that I cannot cut and paste from netbeans editor into notepad while I have the Find/Replace dialog open at bottom of editor. Once I close it, I can then cut and paste from the editor. Bobspeck, how often you cannot cut and paste when searchbar is opened? Always, sometimes? I can. Do you have any reproducible steps? Thanks. There are no errors in messages.log. I run into this error several times a day but had trouble trying to recreate it. I found I can reproduce it more frequently when I change a java file and don't save it, then try copying and pasting into notepad. This isn't fool proof and the IDE will copy and paste some of the time, but it fails considerably more when doing this (One out of five-ish). Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2 Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) It happens to me a couple times a day and the only fix is to restart NetBeans. Very frustrating since this issue did not exist a few months when I was using an older release. It is almost as if Netbeans would retain the last data it copied to the clipboard. Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2 Java: 1.8.0_11; Java HotSpot(TM) 64-Bit Server VM 25.11-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Same as i wrote to the duplicated bug 250558: If any of you suffer from this regularly, there is a logging that can be switched on. Run NetBeans with -J-Dorg.netbeans.NbClipboard.level=FINE Then every time you switch to an external app, copy something and switch back, the IDE log should be updated with a lot of log messages. When the issue happens again, please try to pick the messages added when switched to NetBeans and attach them here. If you know how to reproduce reliably, you're very welcome to share the steps to reproduce. Thanks I am facing a similar but worse bug. While copy pasting within Netbeans copy paste function gets disabled on its own and when it does i cannot copy paste even by mouse. This happens when i am using ctrl+c/v in netbeans 8.02. After some digging on the internet i created a shortcut to clear the clipboard and then when the bug happened again i cleared the clipboard which made the copy paste work again. But i don't know if this solution will be a permanent one or not. Please look into this. I registered here only to provide a temporary solution to people who find this very annoyinig. I have same problem. It is only in Windows. I haven't same issue in Linux. I understand frustration that users have with this bug. Copy/Pasting is essential part of code editor. I would like to help, but this bug is difficult to reproduce, it never happened on my system. If some user see this issue quite often, can use logs mentioned in Ondra's comment (https://netbeans.org/bugzilla/show_bug.cgi?id=246246#c12) I am requesting waiver for this issue, so this issue will not stop NB 8.1. There is no much hope we will fix this in this short time to 8.1. I haven't experienced this anymore for months. Maybe "patch 2" or newer JDK has made a difference? Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2 Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27 Bug waiver for 8.1 approved. *** Bug 247319 has been marked as a duplicate of this bug. *** Created attachment 156437 [details]
Log of switching to Netbeans and trying to paste data
Created attachment 156438 [details]
Log of fixing issue temporarily by doing some copying in Netbeans
The same problem happens on daily basis for: Product Version: NetBeans IDE 8.1 (Build 201510222201) Java: 1.7.0_67; Java HotSpot(TM) 64-Bit Server VM 24.65-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01 *** Bug 256910 has been marked as a duplicate of this bug. *** I reinstalled NetBeans (8.1, but I didn't nuke everything first), and the problem still exists. I can usually get cut/copy and paste to work when I do a reboot of my system, but once I do cut/copy and paste within the IDE (same file or different files) the clipboard reverts to the NetBeans-only mode. Seems to be a Windows 10 issue, as the same configuration on Win 7 works fine. On the other hand, my wife's clean install on her new Win 10 machine and existing install on a machine upgraded from Win 8 to Win 10 both work fine. I'm having the same problem on Windows 8.1 with Netbeans 8.1. Once I copy and paste from within Netbeans I cannot paste anything I've put on the Windows clipboard outside of Netbeans into a file I'm editing in Netbeans. I have to close Netbeans and reopen it to fix the issue. Really annoying. The problem persists on: Product Version: NetBeans IDE 8.1 (Build 201510222201) Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1 Java: 1.8.0_102; Java HotSpot(TM) 64-Bit Server VM 25.102-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_102-b14 System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb) One workaround that tends to work for me is to copy something ELSE, paste it somewhere, then copy what you originally wanted to copy and try pasting it again. This is also an issue on Windows 7. I am using NetBeans for Java training, and I frequently paste sample code from Google Chrome into an existing Java file in the NetBeans IDE. At least once a day, sometimes twice a day, I have to restart the IDE because it pastes something I previously copied inside the IDE and won't paste the content from Chrome, no matter how many times I Alt+Tab back and copy it. It is a very visible problem and makes me hesitant to recommend this IDE to other developers. I will be glad to turn on my logging features, but the fact that it has already been reported hundreds of times and marked "FIXED" leaves me feeling a bit hopeless. Product Version: NetBeans IDE 8.2 (Build 201609300101) Java: 1.8.0_102; Java HotSpot(TM) 64-Bit Server VM 25.102-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_102-b14 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb) Created attachment 162808 [details]
screencap and log files
what_i_copied.png (Chrome screenshot)
what_u_pasted.png (NetBeans screenshot)
messages - copypasted.log (Complete log file, immediately after bug appears)
messages - copypasted_x2.log (Complete log file, bug continues after 2nd attempt)
Hi, I have the same issue: 1) Set focus to Chrome 2) Copy "material" 3) ALT-TAB to Netbeans 4) paste > "materials" 5) ALT-TAB to Chrome 6) Copy "drivers" 7) ALT-TAB to Netbeans 8) Paste > "materials" 9) Wait xxx seconds (as adviced here: https://netbeans.org/bugzilla/show_bug.cgi?id=88161 ) 10) Paste > "materials" May I know how is this still an issue as it has been raised in 2006 already? Is anyone really trying to fix the IDE bugs? I'm using: Product Version: NetBeans IDE 8.2 (Build 201609300101) Java: 1.8.0_112; Java HotSpot(TM) 64-Bit Server VM 25.112-b15 Runtime: Java(TM) SE Runtime Environment 1.8.0_112-b15 System: Windows 7 version 6.1 running on amd64; Cp1250; cs_CZ (nb) Thank you very much for fixing this and have a nice day... With kind regards, Ernique Every one who posted here a comment should also vote for this bug. 5 votes are not very much ... I have the same problem on TWO Windows 7 pro machines. For some inconsistent-non-reproducible-when-required reason, NetBeans IDE 8.0.2 Build 201411181905 (actually 8.0.1 also) does not reliably handle clipboard copies and pastes. It works most of the time but when it stop working I have to restart Netbeans to get it going again. I see this has been reported on and off since 2006 with the NetBeans IDE. Really? Wow. Are there no way to trap misbehaving clipboards? How about writing an AutoHotkey script that that copies and pastes an incremental number into Netbeans? Then you guys can check if the number is not 1 more than the previous one and if it is not then you have found the moment it happens. If you want I can write that script for you? Any takers? Can we please get a fix for this? It has been happening for 10 years guys. That some sort of anniversary not so? (In reply to xantiva from comment #29) > Every one who posted here a comment should also vote for this bug. 5 votes > are not very much ... How do I vote for a bug? I would like to add a comment about this issue. Strictly speaking, I do not believe this is a Netbeans bug. Rather, I strongly suspect it is either a JRE or JDK bug. I have encountered problems with copy/paste in a Swing application I built to store to and retrieve from the copy buffer. Specifically, my swing application (called Pastey) uses this logic ... begin snippet ... Toolkit toolkit = Toolkit.getDefaultToolkit(); Clipboard clipboard = toolkit.getSystemClipboard(); String data = (String) clipboard.getData(DataFlavor.stringFlavor); ... end snippet ... to get String data stored to the clipboard. Later, I use this logic ... begin snippet ... Toolkit toolkit = Toolkit.getDefaultToolkit(); Clipboard clipboard = toolkit.getSystemClipboard(); clipboard.setContents(new StringSelection(data), null); ... end snippet ... to populate the clipboard with a String. I often find that when the conditions are right, the value stored (validated using logs) using setContents is *not* what I get back when I later call getData. Instead, I get the previously fetch value from that point forward. Restarting the application fixes the issue. Because of this, I suspect this issue is bigger than Netbeans itself. I will personally try to figure out a reliable way to replicate this condition and then see if I can get Netbeans to exhibit the same behavior. It does seem to happen more with copy/paste activity alternating between Java and Non-Java based applications. *** Bug 270255 has been marked as a duplicate of this bug. *** This bug seems a duplicate of #188643 |