java.lang.NullPointerException

Atlassian JIRA | Marek Parfianowicz [Atlassian] | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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.

    Atlassian JIRA | 2 years ago | Marek Parfianowicz [Atlassian]
    java.lang.NullPointerException
  2. 0

    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.

    Atlassian JIRA | 2 years ago | Marek Parfianowicz [Atlassian]
    java.lang.NullPointerException
  3. 0

    NPE @ Control.internal_new_GC

    GitHub | 2 years ago | buchen
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    DBeaver Forum • View topic - Opening files in dbeaver / via project explorer

    jkiss.org | 2 years ago
    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.eclipse.swt.custom.CTabFolderLayout.computeSize()
    2. RWT
      Display.windowProc
      1. org.eclipse.swt.custom.CTabFolderLayout.computeSize(CTabFolderLayout.java:39)
      2. org.eclipse.swt.widgets.Composite.computeSize(Composite.java:234)
      3. org.eclipse.swt.layout.GridData.computeSize(GridData.java:491)
      4. org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:221)
      5. org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:197)
      6. org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1290)
      7. org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297)
      8. org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297)
      9. org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1297)
      10. org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1276)
      11. org.eclipse.swt.widgets.Composite.layout(Composite.java:665)
      12. org.eclipse.swt.custom.CTabFolder.runUpdate(CTabFolder.java:3755)
      13. org.eclipse.swt.custom.CTabItem.getBounds(CTabItem.java:149)
      14. org.eclipse.swt.custom.CTabFolder.onPaint(CTabFolder.java:1993)
      15. org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:289)
      16. org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      17. org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
      18. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
      19. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
      20. org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
      21. org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1491)
      22. org.eclipse.swt.widgets.Control.windowProc(Control.java:4667)
      23. org.eclipse.swt.widgets.Display.windowProc(Display.java:5036)
      23 frames
    3. org.eclipse.swt
      IOleInPlaceObject.InPlaceDeactivate
      1. org.eclipse.swt.internal.win32.OS.VtblCall(Native Method)
      2. org.eclipse.swt.internal.ole.win32.IOleInPlaceObject.InPlaceDeactivate(IOleInPlaceObject.java:21)
      2 frames