Have a project at hand that uses the SWT framework. Unfortunately, am currently encountering this problem which I really don't know how to solve it, got any insights why I'm encountering this issue?
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3976)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3653)
... 4 more
Caused by: java.lang.NullPointerException
at org.eclipse.swt.widgets.Control.internal_new_GC(Control.java:2126)
at org.eclipse.swt.graphics.GC.<init>(GC.java:171)
at org.eclipse.swt.graphics.GC.<init>(GC.java:134)
at org.eclipse.swt.widgets.Tree.setScrollWidth(Tree.java:2951)
at org.eclipse.swt.widgets.Tree.setScrollWidth(Tree.java:2944)
at org.eclipse.swt.widgets.Tree.removeAll(Tree.java:2392)
... <internal code>
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
... 6 more
My apologies for hiding <internal code>
, the project is confidential. Tried to make a snippet to replicate it, can't seem to replicate it well.
This stacktrace line org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
is pertaining to this maven dependency:
- GroupId: org.eclipse.swt
- ArtifactId: org.eclipse.swt.cocoa.macosx
- Version: 4.2.1