Bug 228006 [Markers] Marker generation should not run on shutdown
I20080415-1646 Sorry, no steps to reproduce, but I was shutting down eclipse and got this NPE: !ENTRY org.eclipse.core.jobs 4 2 2008-04-21 15:48:30.821 !MESSAGE An internal error occurred during: "Process resource updates". !STACK 0 java.lang.NullPointerException at org.eclipse.core.internal.resources.Marker.getInfo(Marker.java:179) at org.eclipse.core.internal.resources.Marker.getType(Marker.java:193) at org.eclipse.ui.views.markers.internal.MarkerGroup$GroupMarkerField.compare(MarkerGroup.java:311) at org.eclipse.ui.internal.views.markers.MarkerComparator.compare(MarkerComparator.java:88) at java.util.Arrays.mergeSort(Arrays.java:1307) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.sort(Arrays.java:1223) at org.eclipse.ui.internal.views.markers.CachedMarkerBuilder.sortAndMakeCategories(CachedMarkerBuilder.java:1107) at org.eclipse.ui.internal.views.markers.CachedMarkerBuilder.buildAllMarkers(CachedMarkerBuilder.java:234) at org.eclipse.ui.internal.views.markers.CachedMarkerBuilder$1.run(CachedMarkerBuilder.java:351) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) I have a workspace with 135129 errors (yeah!) and I think the markers view was still populating itself (which seams to take forever) during the shutdown.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CachedMarkerBuilder.java
import org.eclipse.ui.internal.ide.StatusUtil;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
import org.eclipse.ui.statushandlers.StatusManager;
import org.eclipse.ui.views.markers.FilterConfigurationArea;
import org.eclipse.ui.views.markers.MarkerField;
import org.eclipse.ui.views.markers.MarkerItem;
import org.eclipse.ui.views.markers.internal.MarkerGroup;
import org.eclipse.ui.views.markers.internal.MarkerMessages;
import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
import org.eclipse.ui.views.markers.internal.MarkerType;
import org.eclipse.ui.views.markers.internal.ProblemFilter;
import org.eclipse.ui.views.markers.internal.Util;
/**
 * The CachedMarkerBuilder is the object that generates the list of markers from
 * a generator.
 * 
 * @since 3.4
 * 
 */
public class CachedMarkerBuilder {
	private static final MarkerCategory[] EMPTY_CATEGORY_ARRAY = new MarkerCategory[0];
	private static final MarkerEntry[] EMPTY_ENTRY_ARRAY = new MarkerEntry[0];
	private static final int SHORT_DELAY = 100;
	
	private static final int TIME_OUT = 30000;
	private static final String TAG_FILTERS_SECTION = "filterGroups"; 
	private static final String TAG_GROUP_ENTRY = "filterGroup"; 
	private static final String TAG_AND = "andFilters"; 
	private static final String TAG_CATEGORY_GROUP = "categoryGroup"; 
	private static final String VALUE_NONE = "none";