Project: Eclipse_Platform_UI
Bug 240381 [Progress] NPE in org.eclipse.ui.workbench GroupInfo.java and JobTreeElement.java
Reported: 2008-07-10 15:40:49 | Status: verified fixed

Build ID: 3.4 Steps To Reproduce: I have not been able to find a consistent pattern but we get this NPE quite a few times: Caused by: java.lang.NullPointerException at org.eclipse.ui.internal.progress.GroupInfo.compareTo(Unknown Source) at org.eclipse.ui.internal.progress.ProgressManagerUtil$1.compare(Unknown Source) at org.eclipse.jface.viewers.ViewerComparator$1.compare(Unknown Source) at java.util.Arrays.mergeSort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at org.eclipse.jface.viewers.ViewerComparator.sort(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(Unknown Source) at org.eclipse.ui.internal.progress.ProgressCanvasViewer.internalRefresh(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer.internalRefresh(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer$8.run(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer.refresh(Unknown Source) at org.eclipse.jface.viewers.StructuredViewer.refresh(Unknown Source) at org.eclipse.ui.internal.progress.ProgressCanvasViewer.add(Unknown Source) at org.eclipse.ui.internal.progress.ProgressViewerContentProvider.add(Unknown Source) at org.eclipse.ui.internal.progress.ProgressViewUpdater$1.runInUIThread(Unknown Source) at org.eclipse.ui.progress.UIJob$1.run(Unknown Source) at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source) ... 31 more We also get a similar NPE from the same method in JobTreeElement.java. Our product still runs fine with the NPEs but they result in an ugly message being shown to the user. We have patched it in our product by testing for nulls in these methods. More information:

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/GroupInfo.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/SubTaskInfo.java