Bug 243165 [ErrorHandling] [StatusHandling] Fatal error appears twice when reported from JOB
When a job reports fatal error (f.e. OutOfMemoryException) it is reported twice (and the window prompting the user to close the workbench appears). I have investigated that it is reported directly once in ProgressManager internal listener done method, and the second report is picked from log via StatusManager StatusManagerLogListener.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchErrorHandler.java
if (isFatal(statusAdapter) && style != StatusManager.NONE) {
			UIJob handlingExceptionJob = new UIJob("IDE Exception Handler") 
			{
				/*
				 * (non-Javadoc)
				 * 
				 * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
				 */
				public IStatus runInUIThread(IProgressMonitor monitor) {
					handleException(statusAdapter.getStatus().getException());
					return new Status(
							IStatus.OK,
							IDEWorkbenchPlugin.IDE_WORKBENCH,
							IDEWorkbenchMessages.IDEExceptionHandler_ExceptionHandledMessage);
				}
			};
			handlingExceptionJob.setSystem(true);
			handlingExceptionJob.schedule();
		}
	}
	private boolean isFatal(final StatusAdapter statusAdapter) {
		if (statusAdapter.getStatus().getException() != null
				&& (statusAdapter.getStatus().getException() instanceof OutOfMemoryError
						|| statusAdapter.getStatus().getException() instanceof StackOverflowError
						|| statusAdapter.getStatus().getException() instanceof VirtualMachineError || statusAdapter
						.getStatus().getException() instanceof SWTError)) {
			return true;
		}
		return false;
	}