Project: SWT
Bug 277356 [cocoa] npe in Tree widget
Reported: 2009-05-21 13:07:01 | Status: verified fixed

Upon launch, Mylyn task list opens with the following error displayed within the view: java.lang.NullPointerException at org.eclipse.swt.widgets.Tree.outlineView_child_ofItem(Tree.java:1910) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4837) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSOutlineView.rowForItem(NSOutlineView.java:76) at org.eclipse.swt.widgets.TreeItem.redraw(TreeItem.java:908) at org.eclipse.swt.widgets.TreeItem.setImage(TreeItem.java:1351) at org.eclipse.swt.widgets.TreeItem.setImage(TreeItem.java:1356) at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2666) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1863) at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:716) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1838) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1794) at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1780) at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1457) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1392) at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:402) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1353) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1455) at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537) at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.refresh(FilteredTree.java:1205) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1414) at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.refresh(FilteredTree.java:1195) at org.eclipse.jface.viewers.ContentViewer.setContentProvider(ContentViewer.java:252) at org.eclipse.jface.viewers.StructuredViewer.setContentProvider(StructuredViewer.java:1611) at org.eclipse.jface.viewers.AbstractTreeViewer.setContentProvider(AbstractTreeViewer.java:2314) at org.eclipse.jface.viewers.TreeViewer.setContentProvider(TreeViewer.java:957) at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.setContentProvider(FilteredTree.java:1241) at org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.applyPresentation(TaskListView.java:1112) at org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.applyPresentation(TaskListView.java:1092) at org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.restoreState(TaskListView.java:863) at org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.createPartControl(TaskListView.java:1061) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:367) at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:226) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313) at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:529) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256) at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:668) at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:576) at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568) at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272) at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981) at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2626) at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:2964) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2945) at org.eclipse.ui.internal.WorkbenchWindow$21.runWithException(WorkbenchWindow.java:2262) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3401) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3098) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803) at org.eclipse.ui.internal.Workbench$28.runWithException(Workbench.java:1384) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3401) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3098) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2316) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java