java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Closing the "Cloud Editor" in Eclipse causes that sometimes an exception is thrown and reported in the Error Log: {noformat} Error disposing widget for : org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl Clover Coverage Cloud Report java.lang.NullPointerException at org.eclipse.swt.custom.CTabFolderLayout.computeSize(CTabFolderLayout.java:39) at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:234) at org.eclipse.swt.layout.GridData.computeSize(GridData.java:491) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:221) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:197) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1290) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1276) at org.eclipse.swt.widgets.Composite.layout(Composite.java:665) at org.eclipse.swt.custom.CTabFolder.runUpdate(CTabFolder.java:3755) at org.eclipse.swt.custom.CTabItem.getBounds(CTabItem.java:149) at org.eclipse.swt.custom.CTabFolder.onPaint(CTabFolder.java:1993) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:289) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1491) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4667) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5036) at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) at org.eclipse.swt.internal.ole.win32.IOleInPlaceObject.InPlaceDeactivate(IOleInPlaceObject.java:21) {noformat} and {noformat} Unhandled event loop exception java.lang.NullPointerException at org.eclipse.swt.custom.CTabFolderLayout.computeSize(CTabFolderLayout.java:39) at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:234) at org.eclipse.swt.layout.GridData.computeSize(GridData.java:491) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:221) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:197) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1290) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1276) at org.eclipse.swt.widgets.Composite.setLayoutDeferred(Composite.java:1087) at org.eclipse.swt.widgets.Display.runDeferredLayouts(Display.java:4196) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636) {noformat} Apparently, it fails in the CTabFolderLayout.computeSize() method: {code:java} protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { CTabFolder folder = (CTabFolder)composite; CTabFolderRenderer renderer = folder.renderer; ... tabW = Math.max(tabW, renderer.computeSize(width, 2, gc, -1, -1).x); {code} the 'renderer' is null. This renderer is being set in CTabFolder.init() method and set to null in the CTabFolder.onDispose() method. It *may* be related with the: CloudEditor.dispose() which calls removeCoverageChangeListener after the super.dispose() so a refresh event may come in the meantinme or CloudEditor.createPages() which "hacks" the container layout by changing it from FillLayout to GridLayout.
    via by Marek Parfianowicz [Atlassian],
  • Closing the "Cloud Editor" in Eclipse causes that sometimes an exception is thrown and reported in the Error Log: {noformat} Error disposing widget for : org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl Clover Coverage Cloud Report java.lang.NullPointerException at org.eclipse.swt.custom.CTabFolderLayout.computeSize(CTabFolderLayout.java:39) at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:234) at org.eclipse.swt.layout.GridData.computeSize(GridData.java:491) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:221) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:197) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1290) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1276) at org.eclipse.swt.widgets.Composite.layout(Composite.java:665) at org.eclipse.swt.custom.CTabFolder.runUpdate(CTabFolder.java:3755) at org.eclipse.swt.custom.CTabItem.getBounds(CTabItem.java:149) at org.eclipse.swt.custom.CTabFolder.onPaint(CTabFolder.java:1993) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:289) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1491) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4667) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5036) at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) at org.eclipse.swt.internal.ole.win32.IOleInPlaceObject.InPlaceDeactivate(IOleInPlaceObject.java:21) {noformat} and {noformat} Unhandled event loop exception java.lang.NullPointerException at org.eclipse.swt.custom.CTabFolderLayout.computeSize(CTabFolderLayout.java:39) at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:234) at org.eclipse.swt.layout.GridData.computeSize(GridData.java:491) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:221) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:197) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1290) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1276) at org.eclipse.swt.widgets.Composite.setLayoutDeferred(Composite.java:1087) at org.eclipse.swt.widgets.Display.runDeferredLayouts(Display.java:4196) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636) {noformat} Apparently, it fails in the CTabFolderLayout.computeSize() method: {code:java} protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { CTabFolder folder = (CTabFolder)composite; CTabFolderRenderer renderer = folder.renderer; ... tabW = Math.max(tabW, renderer.computeSize(width, 2, gc, -1, -1).x); {code} the 'renderer' is null. This renderer is being set in CTabFolder.init() method and set to null in the CTabFolder.onDispose() method. It *may* be related with the: CloudEditor.dispose() which calls removeCoverageChangeListener after the super.dispose() so a refresh event may come in the meantinme or CloudEditor.createPages() which "hacks" the container layout by changing it from FillLayout to GridLayout.
    via by Marek Parfianowicz [Atlassian],
  • NPE @ Control.internal_new_GC
    via GitHub by buchen
    ,
  • OS X problem when closing dialog
    via djproject by lukask0
    ,
  • Not "seeing" commands, NPE
    via djproject by javydreamercsw
    ,
    • java.lang.NullPointerException at org.eclipse.swt.custom.CTabFolderLayout.computeSize(CTabFolderLayout.java:39) at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:234) at org.eclipse.swt.layout.GridData.computeSize(GridData.java:491) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:221) at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:197) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1290) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297) at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1276) at org.eclipse.swt.widgets.Composite.layout(Composite.java:665) at org.eclipse.swt.custom.CTabFolder.runUpdate(CTabFolder.java:3755) at org.eclipse.swt.custom.CTabItem.getBounds(CTabItem.java:149) at org.eclipse.swt.custom.CTabFolder.onPaint(CTabFolder.java:1993) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:289) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1491) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4667) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5036) at org.eclipse.swt.internal.win32.OS.VtblCall(Native Method) at org.eclipse.swt.internal.ole.win32.IOleInPlaceObject.InPlaceDeactivate(IOleInPlaceObject.java:21)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,