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
import org.eclipse.swt.SWTError;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.application.IWorkbenchConfigurer;
import org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog;
import org.eclipse.ui.progress.IProgressConstants;
import org.eclipse.ui.progress.UIJob;
import org.eclipse.ui.statushandlers.StatusAdapter;
import org.eclipse.ui.statushandlers.StatusManager;
import org.eclipse.ui.statushandlers.WorkbenchErrorHandler;
import com.ibm.icu.text.MessageFormat;
/**
 * This is the IDE workbench error handler. The instance of this handler is
 * returned from IDEWorkbenchAdvisor#getWorkbenchErrorHandler(). All handled
 * statuses are checked against severity and logged using logging facility (by
 * superclass).
 * 
 * @since 3.3
 */
public class IDEWorkbenchErrorHandler extends WorkbenchErrorHandler {
	private int exceptionCount = 0;
	static private FatalErrorDialog dialog;
	private boolean closing = false;
	private IWorkbenchConfigurer workbenchConfigurer;
	
	
	private static String MSG_OutOfMemoryError = IDEWorkbenchMessages.FatalError_OutOfMemoryError;
	private static String MSG_StackOverflowError = IDEWorkbenchMessages.FatalError_StackOverflowError;
	private static String MSG_VirtualMachineError = IDEWorkbenchMessages.FatalError_VirtualMachineError;