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/ExtendedMarkersView.java
else {
				column = new TreeViewerColumn(viewer, SWT.NONE);
				column.getColumn().setResizable(true);
				column.getColumn().setMoveable(true);
				column.getColumn().addSelectionListener(getHeaderListener());
			}
			column.getColumn().setData(MARKER_FIELD, markerField);
			
			column.setLabelProvider(new MarkerColumnLabelProvider(markerField));
			column.getColumn().setText(markerField.getColumnHeaderText());
			column.getColumn().setToolTipText(
					markerField.getColumnTooltipText());
			column.getColumn().setImage(markerField.getColumnHeaderImage());
			EditingSupport support = markerField.getEditingSupport(viewer);
			if (support != null)
				column.setEditingSupport(support);
			if (builder.getPrimarySortField().equals(markerField))
				updateDirectionIndicator(column.getColumn(), markerField);
			
			int columnWidth = markerField.getDefaultColumnWidth(tree);
			if (i == 0) {
				
				GC gc = new GC(tree);
				gc.setFont(tree.getFont());
				FontMetrics fontMetrics = gc.getFontMetrics();
				gc.dispose();
				columnWidth = Math.max(columnWidth, fontMetrics
						.getAverageCharWidth() * 5);
			}
			if (columnWidths != null) {