Bug 134190 [JFace] NPE in StatusLine class
In class org.eclipse.jface.action.StatusLine, method SubTask(String name) NPE. StatusLine.subTask(String) line: 552 StatusLineManager$1.subTask(String) line: 205 EventLoopProgressMonitor(ProgressMonitorWrapper).subTask(String) line: 154 EventLoopProgressMonitor.subTask(String) line: 171 SBModelManager.saveModelState(IProject, IProgressMonitor) line: 175 It happens if beginTask method was never called before. I think it is better to check fTaskName.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
private final StatusLineLayoutData DEFAULT_DATA = new StatusLineLayoutData();
		public Point computeSize(Composite composite, int wHint, int hHint,
				boolean changed) {
			if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) {
				return new Point(wHint, hHint);
			}
			Control[] children = composite.getChildren();
			int totalWidth = 0;
			int maxHeight = 0;
			int totalCnt = 0;
			for (int i = 0; i < children.length; i++) {
				boolean useWidth = true;
				Control w = children[i];
				if (w == fProgressBarComposite && !fProgressIsVisible) {
					useWidth = false;
				} else if (w == fToolBar && !fCancelButtonIsVisible) {
					useWidth = false;
				}
				StatusLineLayoutData data = (StatusLineLayoutData) w
						.getLayoutData();
				if (data == null) {
					data = DEFAULT_DATA;
				}
				Point e = w.computeSize(data.widthHint, data.heightHint,
						changed);
				if (useWidth) {
					totalWidth += e.x;