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.

Bug 221359 - While NetBeans is locked, the ClipBoard doesn´t works
Summary: While NetBeans is locked, the ClipBoard doesn´t works
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on: 221357
Blocks:
  Show dependency tree
 
Reported: 2012-11-02 14:34 UTC by stefan79
Modified: 2012-11-08 02:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2012-11-02 14:34:41 UTC
[ BUILD # : 201211020001 ]
[ JDK VERSION : 1.7.7 ]

While the IDE hangs (see 221357) the ClipBoard doesn´t work.
In my Case I tried to copy a email-subject vom Outlook to an other Java (Swing)
- program.

After I killed NetBeans, I could use the clipboard again.
(result of "ClipBoard History"?).
Comment 1 Stanislav Aubrecht 2012-11-02 18:13:20 UTC
According to IDE log attached to issue #221357 there was an exception when data have been exported from editor to clipboard. So perhaps the clipboard state is broken and cannot be accessed then.

Reassigning to editor team for evaluation.
Comment 2 Milutin Kristofic 2012-11-06 17:08:51 UTC
java.lang.Exception
	at org.netbeans.lib.lexer.TokenHierarchyOperation.ensureReadLocked(TokenHierarchyOperation.java:397)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.tokenSequence(TokenHierarchyOperation.java:422)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.tokenSequence(TokenHierarchyOperation.java:418)
	at org.netbeans.api.lexer.TokenHierarchy.tokenSequence(TokenHierarchy.java:186)
	at org.netbeans.api.java.source.SourceUtils.getJavaTokenSequence(SourceUtils.java:149)
	at org.netbeans.modules.java.editor.imports.ClipboardHandler$ImportingTransferHandler.insideToken(ClipboardHandler.java:558)
	at org.netbeans.modules.java.editor.imports.ClipboardHandler$ImportingTransferHandler.exportToClipboard(ClipboardHandler.java:378)
	at org.openide.text.QuietEditorPane$DelegatingTransferHandler.exportToClipboard(QuietEditorPane.java:349)
	at javax.swing.TransferHandler$TransferAction.actionPerformedImpl(TransferHandler.java:1745)
	at javax.swing.TransferHandler$TransferAction.access$700(TransferHandler.java:1684)
	at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1707)
	at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1705)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1722)
	at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1720)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:1719)
	at javax.swing.text.JTextComponent.invokeAction(JTextComponent.java:1513)
	at javax.swing.text.JTextComponent.copy(JTextComponent.java:1474)
	at org.netbeans.editor.BaseKit$CopyAction.actionPerformed(BaseKit.java:2050)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1664)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2879)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2926)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2842)
	at java.awt.Component.processEvent(Component.java:6282)
	at java.awt.Container.processEvent(Container.java:2229)
Comment 3 Jan Lahoda 2012-11-06 18:27:07 UTC
Accessing the tokens under the read lock:
http://hg.netbeans.org/jet-main/rev/6432e104f110
Comment 4 Quality Engineering 2012-11-08 02:51:37 UTC
Integrated into 'main-golden', will be available in build *201211080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6432e104f110
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #221359: only access the tokens under a document lock