Bug 123169 - [Progress] NPE from JobInfo
Summary: [Progress] NPE from JobInfo
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-01-09 19:15 EST by Brock Janiczak CLA
Modified: 2007-08-07 14:50 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brock Janiczak CLA 2006-01-09 19:15:55 EST
Version: 3.2.0
Build id: I20060105-0800

While running a CVS synchronize the attached exception appeared in my log.  My guess is that the taskInfo field was cleared after the null check, but before getDisplayString was caleld on it).  Assigning the field to a local variable first should stop this happening again.  getPercentDone and getCondensedDisplayString already do this.

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
    at org.eclipse.swt.SWT.error(SWT.java:3283)
    at org.eclipse.swt.SWT.error(SWT.java:3206)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3262)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2908)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1764)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1728)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:398)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
    at org.eclipse.core.launcher.Main.run(Main.java:977)
    at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.NullPointerException
    at org.eclipse.ui.internal.progress.JobInfo.getDisplayStringWithStatus(JobInfo.java:269)
    at org.eclipse.ui.internal.progress.JobInfo.getDisplayString(JobInfo.java:246)
    at org.eclipse.ui.internal.progress.JobInfo.getDisplayString(JobInfo.java:239)
    at org.eclipse.ui.internal.progress.GroupInfo.compareTo(GroupInfo.java:111)
    at org.eclipse.ui.internal.progress.ProgressManagerUtil$1.compare(ProgressManagerUtil.java:93)
    at org.eclipse.jface.viewers.ViewerSorter$1.compare(ViewerSorter.java:177)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.sort(Unknown Source)
    at org.eclipse.jface.viewers.ViewerSorter.sort(ViewerSorter.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:948)
    at org.eclipse.ui.internal.progress.ProgressCanvasViewer.internalRefresh(ProgressCanvasViewer.java:135)
    at org.eclipse.jface.viewers.StructuredViewer.internalRefresh(StructuredViewer.java:1149)
    at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1349)
    at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1259)
    at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1347)
    at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1304)
    at org.eclipse.ui.internal.progress.ProgressCanvasViewer.add(ProgressCanvasViewer.java:237)
    at org.eclipse.ui.internal.progress.ProgressViewerContentProvider.add(ProgressViewerContentProvider.java:203)
    at org.eclipse.ui.internal.progress.ProgressViewUpdater$1.runInUIThread(ProgressViewUpdater.java:271)
    at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:93)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
        ... 20 more
Comment 1 Tod Creasey CLA 2006-02-06 14:44:06 EST

*** This bug has been marked as a duplicate of 96602 ***
Comment 2 Tod Creasey CLA 2006-06-15 08:19:54 EDT
Lets reopen and try your solution
Comment 3 Kim Horne CLA 2007-06-07 14:19:04 EDT
I just got this NPE under the same circumstances but the line number has changed to 289.
Comment 4 Tod Creasey CLA 2007-06-27 10:26:15 EDT
Fixed in build >20070627
Comment 5 Tod Creasey CLA 2007-08-07 14:50:19 EDT
Verified in  I20070807-0010