Community
Participate
Working Groups
For SmartGit we sometimes, but relatively rarely get following exception reported when showing the preferences dialog on OS X 10.9 or 10.10: java.lang.NullPointerException at org.eclipse.swt.widgets.Composite._getChildren(Composite.java:95) at org.eclipse.swt.widgets.Composite.setTabGroupFocus(Composite.java:1107) at org.eclipse.swt.widgets.Control.traverseGroup(Control.java:4884) at org.eclipse.swt.widgets.Shell.windowDidBecomeKey(Shell.java:2161) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5675) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:214) at org.eclipse.swt.widgets.Widget.becomeKeyWindow(Widget.java:366) at org.eclipse.swt.widgets.Shell.becomeKeyWindow(Shell.java:525) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5499) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSWindow.makeKeyAndOrderFront(NSWindow.java:202) at org.eclipse.swt.widgets.Shell.makeKeyAndOrderFront(Shell.java:1291) at org.eclipse.swt.widgets.Shell.setWindowVisible(Shell.java:1972) at org.eclipse.swt.widgets.Shell.open(Shell.java:1349) Unfortunately, I don't have a test snippet to reproduce.
Same happens with SWT 4.7, but a different stacktrace: java.lang.NullPointerException at org.eclipse.swt.widgets.Composite._getChildren(Composite.java:96) at org.eclipse.swt.widgets.Composite.reskinChildren(Composite.java:976) at org.eclipse.swt.widgets.ToolBar.reskinChildren(ToolBar.java:705) at org.eclipse.swt.widgets.Widget.reskin(Widget.java:416) at org.eclipse.swt.widgets.Widget.setData(Widget.java:1694)
Does this problem still happen with 4.9 or 4.10?
Sorry for the very late answer. According to our records this issue was last reported against SWT 4.922 with this stacktrace: java.lang.NullPointerException at org.eclipse.swt.widgets.Composite._getChildren(Composite.java:99) at org.eclipse.swt.widgets.Composite.reskinChildren(Composite.java:979) at org.eclipse.swt.widgets.ToolBar.reskinChildren(ToolBar.java:716) at org.eclipse.swt.widgets.Widget.reskin(Widget.java:423) at org.eclipse.swt.widgets.Widget.setData(Widget.java:1704) at ourcode
The last stacktrace is reported 100% reliably reproducible for a user on macOS 11 beta with SmartSVN 14 which uses SWT 4940r7.
(In reply to Thomas Singer from comment #4) > The last stacktrace is reported 100% reliably reproducible for a user on > macOS 11 beta with SmartSVN 14 which uses SWT 4940r7. Can you please post the most recent stack trace (with line numbers)?
The stacktrace is java.lang.NullPointerException at org.eclipse.swt.widgets.Composite._getChildren(Composite.java:99) at org.eclipse.swt.widgets.Composite.reskinChildren(Composite.java:979) at org.eclipse.swt.widgets.ToolBar.reskinChildren(ToolBar.java:716) at org.eclipse.swt.widgets.Widget.reskin(Widget.java:423) at org.eclipse.swt.widgets.Widget.setData(Widget.java:1704)
(In reply to Thomas Singer from comment #6) > The stacktrace is > > java.lang.NullPointerException > at org.eclipse.swt.widgets.Composite._getChildren(Composite.java:99) > at org.eclipse.swt.widgets.Composite.reskinChildren(Composite.java:979) > at org.eclipse.swt.widgets.ToolBar.reskinChildren(ToolBar.java:716) > at org.eclipse.swt.widgets.Widget.reskin(Widget.java:423) > at org.eclipse.swt.widgets.Widget.setData(Widget.java:1704) From the stack trace, looks like this is already fixed by Bug 520488 in 4.14.
Hmm, the sent stacktrace is from v4940r7 which is ~1 year younger than commit 53d45085 (Bug 520488 - [cocoa] If a child Shell disposes its parent, parent throws NPE).
You may be right. Looking at the line numbers the stacktrace is not from the expected SWT build.
(In reply to Thomas Singer from comment #9) > You may be right. Looking at the line numbers the stacktrace is not from the > expected SWT build. Closing, please reopen if problem appears again. *** This bug has been marked as a duplicate of bug 520488 ***