Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on copy smth from the system #5

Closed
Chris2011 opened this issue Jul 12, 2016 · 10 comments
Closed

Exception on copy smth from the system #5

Chris2011 opened this issue Jul 12, 2016 · 10 comments

Comments

@Chris2011
Copy link

I have a strange bug. I open chrome, select the address bar and hit ctrl + c (sometimes more than one times, to ensure, that I copied the text. Unfortunately netbeans give me this exception:

java.lang.IllegalStateException: cannot open system clipboard
    at sun.awt.windows.WClipboard.openClipboard(Native Method)
    at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(SunClipboard.java:327)
    at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(SunClipboard.java:188)
    at org.exbin.deltahex.DefaultCodeAreaCommandHandler$1.flavorsChanged(DefaultCodeAreaCommandHandler.java:60)
    at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(SunClipboard.java:441)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    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:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] 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)

very strange, only happens inside the addressbar.

@hajdam
Copy link
Member

hajdam commented Jul 12, 2016

Added ignoring for IllegalStateException with clipboard.
You can test it here: http://deltahex.exbin.org/download.php?org-exbin-deltahex-netbeans.nbm

@Chris2011
Copy link
Author

Should be ok. Thx. :)

@Chris2011
Copy link
Author

It happens again, but I figured out when, only when I using the Windows Edge browser.

java.lang.IllegalStateException: cannot open system clipboard
	at sun.awt.windows.WClipboard.openClipboard(Native Method)
	at sun.awt.datatransfer.SunClipboard.getClipboardFormatsOpenClose(SunClipboard.java:327)
	at sun.awt.datatransfer.SunClipboard.isDataFlavorAvailable(SunClipboard.java:188)
	at org.exbin.deltahex.operation.CodeCommandHandler$1.flavorsChanged(CodeCommandHandler.java:98)
	at sun.awt.datatransfer.SunClipboard$1SunFlavorChangeNotifier.run(SunClipboard.java:441)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	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:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] 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)

@Chris2011 Chris2011 reopened this Dec 19, 2016
@hajdam
Copy link
Member

hajdam commented Dec 19, 2016

I tried to add more ignores.
You can test it again here: http://deltahex.exbin.org/download.php?org-exbin-deltahex-netbeans.nbm

@Chris2011
Copy link
Author

I will test it thx, but why is the plugin listen to the copy/paste logic?

@hajdam
Copy link
Member

hajdam commented Dec 20, 2016

Primary reason lies in deltahex editor, where it listens on changes of clipboard flavor to highlight if paste operation is available in toolbar. In netbeans plugin it's currently used only for context popup menu, but that might be called on menu creation, so maybe I could remove that...

@hajdam
Copy link
Member

hajdam commented Jan 9, 2017

please increase your version number next time. I wanted to downloaded and installed it but it wasn't possible because I already have a version 0.1.4.

Versions of plugins in NetBeans seems to be a bit limited, therefore I cannot distinguish between release and development versions properly. Therefore I increase version only once after each release.

As you tried development version, to install release version with the same version number, you need to uninstall plugin first via Tools/Plugins - tab Installed - check Show details - search for deltahex - select plugin and hit uninstall. (Or faster way is to delete nbm file directly)

@Chris2011
Copy link
Author

Ok I understand that. thx.

@Chris2011
Copy link
Author

It seems fixed. thx for the work.

@hajdam
Copy link
Member

hajdam commented Jan 10, 2017

I'll delete your comment on netbeans plugin page, as it's incorrect, I guess...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants