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.
The following exception occurs when a paste operation is performed to jVi's search dialog java.lang.SecurityException: All swing access to clipboard should be redirected to ExClipboard at org.netbeans.TopSecurityManager.checkWhetherAccessedFromSwingTransfer(TopSecurityManager.java:617) at org.netbeans.TopSecurityManager.checkPermission(TopSecurityManager.java:384) at java.lang.SecurityManager.checkSystemClipboardAccess(SecurityManager.java:1377) at sun.awt.X11.XToolkit.getSystemSelection(XToolkit.java:904) at org.netbeans.editor.BaseCaret.getSystemSelection(BaseCaret.java:716) Full stacktrace is attached. I can not reproduce this, it happens on linux but not windows. The error is reported by mpetras. It is filed as a jVi bug at https://sourceforge.net/tracker2/?func=detail&atid=103653&aid=2388723&group_id=3653 ; I'm copying relevant information. MPetras says it is 100% reproducible. According to the jVi bug report: I do these steps to reproduce: 1) Select some text in the editor with a mouse. 2) Press Ctrl-C to copy it to the clipboard. 3) bring up the search dialog with: / 4) do Ctrl-V - I get the exception and the whole IDE is frozen Note that the Ctrl-C and the Ctrl-V operations are NB/Swing bindings, not jVi code. The searchdialog is a JDialog with a combobox containing and editable JTextField. I will look at jVi so the exception does not hang the IDE, but I don't understand why there is an exception using standard components.
Created attachment 75519 [details] complete exception stacktrace
Probably not a P2 (?)
> Probably not a P2 (?) It does hang the IDE. (Though I'm hoping I can hack around it)
I forgot to include platform info. NOTE: does not fail on windows. This is on Linux (Ubuntu 8.04 32-bit). NetBeans 6.5 or NetBeans 7.0 dev. jVi 1.2.1.alpha1 (NetBeans module ver. 1.2.1.12) JDK 1.6.0_11 (aka JDK 6u11)
I'm totally lost here... Hopefully somebody from core/winsys people could help.
perhaps netbeans clipboard implementation isn't loaded because of ergonomics? is the bug reproducible with ergonomics cluster turned off
I guess ergonomics started after NB 6.5 so it cannot cause this bug.
> I guess ergonomics started after NB 6.5 so it cannot cause this bug. right, i didn't notice it was reported against 6.5 but unless there are some steps to reproduce this bug i can't do anything about it
The steps to reproduce are in the initial description of the bug.
the problem is that jvi search field selects the pasted text which on linux copies the text back to system clipboard i presume. however this means that system clipboard is accessed from javax.swing.TransferHandler$TransferAction (the original paste action) so netbeans security manager thinks somebody's trying to bypass our ExClipboard implemenation. i recommend adding SwingUtilities.invokeLater to com.raelity.jvi.Search$SearchListener.insertUpdate(Search.java:193)