Replies: 6 comments
-
|
I think I've found a problem with WindowBuilder itself. If I comment out any 1 of the above lines the Frame will appear in design mode. If I try and show all of them it won't work. |
Beta Was this translation helpful? Give feedback.
-
|
Ok - I created new JFrame and added all the components back in one at a time. Here is my code and I think I found the problem which is a surprise to me. You will see a line tabbedPane.addTab("1234567890", null, sftp_put_Tab_Panel, null); which has a tab using a 10 character title. If I try and open this Frame with window builder I get the crash above. If I remove a character "123456789" for example I don't get the crash (exception). |
Beta Was this translation helpful? Give feedback.
-
|
What I have done above does replicate the issue I am seeing, but that actual number of characters may be a trigger for something else. I changed the number of characters to 9 and then added a single character to the next tab and the problem was also apparent. Most peculiar. |
Beta Was this translation helpful? Give feedback.
-
|
I have replicated this with WindowBuilder 1.23 and 1.24 |
Beta Was this translation helpful? Give feedback.
-
|
I have tried with Eclipse 2026-03 and 2026-06. Step by step screendumps attached.
|
Beta Was this translation helpful? Give feedback.
-
|
This maybe rubbish - but Claude AI has had a look at my test program and a download of windowbuilder source from github and has come up with this theory :- Bug is in WindowBuilder. The exact line: // org.eclipse.wb.swing/.../JTabbedPaneInfo.java:113 is passing the result of JTabbedPane.getBoundsAt(i) straight into CoordinateUtils.get(java.awt.Rectangle) (line 49 of CoordinateUtils.java), which dereferences o.x with no null check. And JTabbedPane.getBoundsAt(int) is documented to return null — straight from the JDK 21 source: ▎ Returns the tab bounds at index. If the tab at this index is not currently visible in the UI, then returns null. If there is no UI set on this tabbedpane, then returns null. So when one tab is wide enough that the UI delegate decides it isn't currently visible (e.g. it doesn't fit and gets clipped/scrolled out), getBoundsAt legitimately returns null and WindowBuilder NPEs. Why long text triggers it specifically on macOS: WindowBuilder renders your Swing live in-process. On macOS the default L&F is Aqua, whose AquaTabbedPaneCopyFromBasicUI enables a scrollable / overflow Fix in WindowBuilder Line 113 needs a null guard. Minimal patch in JTabbedPaneInfo.getTabs(): java.awt.Rectangle rawBounds = pane.getBoundsAt(i); Worth reporting upstream — the Javadoc on getBoundsAt has documented the null return for years. Workarounds (without patching WB)
|
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
-
I have a JFrame which does not seem to render within WindowBuilder, but runs fine. I have a rather cryptic error message and I don't know how to narrow down the specific code which is triggering the problem.
Internal Error
WindowBuilder encountered unexpected internal error.
This could be caused by a WindowBuilder bug or by a misconfiguration issue, conflict, partial update, etc.
java.lang.NullPointerException: Cannot invoke "org.eclipse.wb.internal.core.editor.structure.components.IComponentsTree.getContentProvider()" because "this.m_componentsTree" is null
Hide stack trace.
Stack trace:
java.lang.NullPointerException: Cannot invoke "org.eclipse.wb.internal.core.editor.structure.components.IComponentsTree.getContentProvider()" because "this.m_componentsTree" is null
at org.eclipse.wb.internal.core.editor.UndoManager.setRoot(UndoManager.java:157)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:589)
at org.eclipse.wb.internal.core.editor.DesignPage$8.run(DesignPage.java:456)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:123)
Full context stack trace:
java.lang.NullPointerException: Cannot invoke "org.eclipse.wb.internal.core.editor.structure.components.IComponentsTree.getContentProvider()" because "this.m_componentsTree" is null
at org.eclipse.wb.internal.core.editor.UndoManager.setRoot(UndoManager.java:157)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:589)
at org.eclipse.wb.internal.core.editor.DesignPage$8.run(DesignPage.java:456)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:123)
<<<<<<<<<<<<***************>>>>>>>>>>>>>>>
!SESSION 2026-05-13 11:06:27.209 -----------------------------------------------
eclipse.buildId=4.40.0.20260430-0612
java.version=21.0.10
java.vendor=Eclipse Adoptium
BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa, NL=en_GB
Framework arguments: -product org.eclipse.epp.package.jee.product -keyring /Users/dave/.eclipse_keyring
Command-line arguments: -os macosx -ws cocoa -arch aarch64 -product org.eclipse.epp.package.jee.product -keyring /Users/dave/.eclipse_keyring
This is a continuation of log file /Users/dave/Commander4j/Source/b8/Scratchpad/.metadata/.bak_0.log
Created Time: 2026-05-13 11:45:21.767
!ENTRY org.eclipse.wb.core 4 4 2026-05-13 11:45:21.768
!MESSAGE Designer [1.24.0.202605051923.202605131107]: Cannot invoke "org.eclipse.wb.internal.core.editor.structure.components.IComponentsTree.getContentProvider()" because "this.m_componentsTree" is null
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.eclipse.wb.internal.core.editor.structure.components.IComponentsTree.getContentProvider()" because "this.m_componentsTree" is null
at org.eclipse.wb.internal.core.editor.UndoManager.setRoot(UndoManager.java:157)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:589)
at org.eclipse.wb.internal.core.editor.DesignPage$8.run(DesignPage.java:456)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:123)
<<<<<<<<<<<<***************>>>>>>>>>>>>>>>
eclipse.buildId=4.40.0.20260430-0612
java.version=21.0.10
java.vendor=Eclipse Adoptium
BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa, NL=en_GB
Framework arguments: -product org.eclipse.epp.package.jee.product -keyring /Users/dave/.eclipse_keyring
Command-line arguments: -os macosx -ws cocoa -arch aarch64 -product org.eclipse.epp.package.jee.product -keyring /Users/dave/.eclipse_keyring
org.eclipse.ui
Error
Wed May 13 11:45:21 BST 2026
Unhandled event loop exception
java.lang.NullPointerException: Cannot read field "x" because "o" is null
at org.eclipse.wb.internal.swing.model.CoordinateUtils.get(CoordinateUtils.java:49)
at org.eclipse.wb.internal.swing.model.component.JTabbedPaneInfo.getTabs(JTabbedPaneInfo.java:113)
at org.eclipse.wb.internal.swing.gef.part.JTabbedPaneEditPart.getModelChildren(JTabbedPaneEditPart.java:65)
at org.eclipse.wb.gef.core.EditPart.refreshChildren(EditPart.java:101)
at org.eclipse.wb.gef.core.EditPart.refresh(EditPart.java:80)
at org.eclipse.wb.core.gef.part.AbstractComponentEditPart.refresh(AbstractComponentEditPart.java:203)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:260)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:221)
at org.eclipse.wb.gef.core.EditPart.refreshChildren(EditPart.java:120)
at org.eclipse.wb.gef.core.EditPart.refresh(EditPart.java:80)
at org.eclipse.wb.core.gef.part.AbstractComponentEditPart.refresh(AbstractComponentEditPart.java:203)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:260)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:221)
at org.eclipse.wb.gef.core.EditPart.refreshChildren(EditPart.java:120)
at org.eclipse.wb.gef.core.EditPart.refresh(EditPart.java:80)
at org.eclipse.wb.core.gef.part.AbstractComponentEditPart.refresh(AbstractComponentEditPart.java:203)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:260)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:221)
at org.eclipse.wb.gef.core.EditPart.refreshChildren(EditPart.java:120)
at org.eclipse.wb.gef.core.EditPart.refresh(EditPart.java:80)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:260)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:221)
at org.eclipse.wb.internal.gef.graphical.RootEditPart.setContents(RootEditPart.java:157)
at org.eclipse.wb.internal.gef.core.AbstractEditPartViewer.setInput(AbstractEditPartViewer.java:53)
at org.eclipse.wb.internal.core.editor.JavaDesignComposite.refresh(JavaDesignComposite.java:135)
at org.eclipse.wb.internal.core.editor.DesignPage.lambda$1(DesignPage.java:587)
at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runRethrow(ExecutionUtils.java:119)
at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils$2.run(ExecutionUtils.java:193)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:131)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4377)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4000)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:164)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:360)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:472)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java:467)
at org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:424)
at org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:387)
at org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java:88)
at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java:267)
at org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:244)
at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:129)
at org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:65)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:290)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4651)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1657)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1680)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1665)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1394)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3269)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1908)
at org.eclipse.swt.custom.CTabFolder.lambda$0(CTabFolder.java:332)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4651)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1657)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1680)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1665)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1394)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4422)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3998)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1051)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:684)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:583)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:192)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563)
at org.eclipse.equinox.launcher.Main.run(Main.java:1415)
<<<<<<<<<<<<***************>>>>>>>>>>>>>>>
eclipse.buildId=4.40.0.20260430-0612
java.version=21.0.10
java.vendor=Eclipse Adoptium
BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa, NL=en_GB
Framework arguments: -product org.eclipse.epp.package.jee.product -keyring /Users/dave/.eclipse_keyring
Command-line arguments: -os macosx -ws cocoa -arch aarch64 -product org.eclipse.epp.package.jee.product -keyring /Users/dave/.eclipse_keyring
org.eclipse.jface
Warning
Wed May 13 11:45:04 BST 2026
Keybinding conflicts occurred. They may interfere with normal accelerator operation.
I am running version 1.24.0.202605021947
The issue seems to specific to one JFrame.
I have simplified the form to try and identify the problem but I get inconsistent results.
If I remove the "System Log" tab from the screen I don't get the error. So I simplified further and removed everything except that one tab, but then it worked with it. Is there any way to narrow down what WindowBuilder is parsing when the error occurs ?
Beta Was this translation helpful? Give feedback.
All reactions