Community
Participate
Working Groups
Created attachment 257570 [details] Stacktrace of the NPE Hi, I'm developing an E4 based application using TreeViewer with multiple columns. When PartRenderingEngine runs eventLoopIdle a NullPointerException is thrown. This happens frequently resulting in an nasty error message dialog. Root cause is that Control.internal_new_GC() does not check if the graphicsContext is valid: NSGraphicsContext graphicsContext = NSGraphicsContext.currentContext(); context = graphicsContext.id; but NSGraphicsContext.currentContext() may return null: public static NSGraphicsContext currentContext() { long /*int*/ result = OS.objc_msgSend(OS.class_NSGraphicsContext, OS.sel_currentContext); return result != 0 ? new NSGraphicsContext(result) : null; } Attached is a stacktrace, bundle is org.eclipse.swt.cocoa.macosx.x86_64_3.104.1.v20150825-0743.jar
*** This bug has been marked as a duplicate of bug 434393 ***