Project: Eclipse_Platform_UI
Bug 180248 [Progress] NPE in JobTreeElement.compareTo(...)
Reported: 2007-03-30 13:18:59 | Status: verified fixed

Build 3.3M6 Self-hosting on my laptop, I resumed from standby mode, and had a session open; but was still offline. I still had pending outgoing changes in my CVS sync view. I triggered a compare action (had forgot being offline), and got the following stack trace. Note that I got many of them, and got prompted to exit workbench. !ENTRY org.eclipse.ui 4 0 2007-03-30 19:08:59.770 !MESSAGE Unhandled event loop exception !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:3499) at org.eclipse.swt.SWT.error(SWT.java:3422) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3650) at org.eclipse.swt.widgets.Display.msgFilterProc(Display.java:3032) at org.eclipse.swt.internal.win32.OS.MessageBoxW(Native Method) at org.eclipse.swt.internal.win32.OS.MessageBox(OS.java:2662) at org.eclipse.swt.widgets.MessageBox.open(MessageBox.java:191) at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler.handleException(IDEWorkbenchErrorHandler.java:137) at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler$1.runInUIThread(IDEWorkbenchErrorHandler.java:90) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3650) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3287) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog.open(InternalErrorDialog.java:78) at org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog.openQuestion(InternalErrorDialog.java:185) at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler.openQuestionDialog(IDEWorkbenchErrorHandler.java:220) at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler.handleException(IDEWorkbenchErrorHandler.java:142) at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler$1.runInUIThread(IDEWorkbenchErrorHandler.java:90) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3650) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3287) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2337) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2301) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2176) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:463) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:458) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:356) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:171) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1141) at org.eclipse.equinox.launcher.Main.main(Main.java:1116) Caused by: java.lang.NullPointerException at org.eclipse.ui.internal.progress.JobTreeElement.compareTo(JobTreeElement.java:82) at org.eclipse.ui.internal.progress.JobInfo.compareTo(JobInfo.java:167) at org.eclipse.ui.internal.progress.ProgressManagerUtil$1.compare(ProgressManagerUtil.java:107) at org.eclipse.jface.viewers.ViewerComparator$1.compare(ViewerComparator.java:187) at java.util.Arrays.mergeSort(Arrays.java:1299) at java.util.Arrays.sort(Arrays.java:1238) at org.eclipse.jface.viewers.ViewerComparator.sort(ViewerComparator.java:185) at org.eclipse.ui.internal.progress.DetailedProgressViewer.add(DetailedProgressViewer.java:158) at org.eclipse.ui.internal.progress.DetailedProgressViewer.internalRefresh(DetailedProgressViewer.java:378) at org.eclipse.jface.viewers.StructuredViewer.internalRefresh(StructuredViewer.java:1221) at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1478) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1333) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1476) at org.eclipse.ui.internal.progress.ProgressViewerContentProvider.refresh(ProgressViewerContentProvider.java:137) at org.eclipse.ui.internal.progress.ProgressViewerContentProvider$2.runInUIThread(ProgressViewerContentProvider.java:76) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) ... 45 more

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