- Forum
- NullPointer with null clipboard
Nicolas Frenay 15 Jun 2009
Hi again,
I'm encountering a NullPointerException caused by null clipboard content.
This is happening when I use another software (Synergy) that allows me to control a remote machine's keyboard and mouse through the network. Apparently there is some case that sets the clipboard content to "null", and it causes a nullPointerException on WireframeSketcher. Might be as simple as checking if it's != null.
Partial stacktrace:
java.lang.NullPointerException
at java.lang.String.<init>(String.java:594)
at org.eclipse.gef.dnd.SimpleObjectTransfer.nativeToJava(SimpleObjectTransfer.java:57)
at org.eclipse.swt.dnd.Clipboard.getContents(Clipboard.java:304)
at org.eclipse.swt.dnd.Clipboard.getContents(Clipboard.java:236)
at org.eclipse.gef.ui.actions.Clipboard.getContents(Clipboard.java:63)
at com.wireframesketcher.ui.fq.calculateEnabled(SourceFile:43)
at org.eclipse.gef.ui.actions.WorkbenchPartAction.refresh(WorkbenchPartAction.java:119)
at com.wireframesketcher.ui.fq.refresh(SourceFile:82)
at com.wireframesketcher.ui.fq.<init>(SourceFile:38)
at com.wireframesketcher.ui.editors.screen.ScreenEditor.createActions(SourceFile:629)
at org.eclipse.gef.ui.parts.GraphicalEditor.initializeActionRegistry(GraphicalEditor.java:332)
at org.eclipse.gef.ui.parts.GraphicalEditor.init(GraphicalEditor.java:321)
at com.wireframesketcher.ui.editors.screen.ScreenEditor.init(SourceFile:193)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:794)
...
Thanks, Nicolas
Peter Severin 15 Jun 2009
Hi Nicolas,
I've found a bug in Eclipse bug database that looks like your problem: https://bugs.eclipse.org/bugs/show_bug.cgi?id=141167
The bug is affecting Eclipse 3.3 and occurs mostly on Linux. It's marked as fixed in Eclipse 3.4.1. Does it look like your case? Would it be possible to upgrade to Eclipse 3.4?