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

Forgot to mention that this bug happens when I try to open a screen. I'm not sure but it might happen when I open Eclipse too...

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?

Oops, I thought it might have something to do with WireframeSketcher.

I will update it as soon as possible.

Sorry to take your time with this.

Thanks!