Bug 47116 [Navigator] Exception on startup after crash
I had to kill Eclipse due to a deadlock. On startup, the Navigator contained "An Error occurred creating this view" and the log contained the folloiwng exception (using 200311192030): org.eclipse.jface.util.Assert$AssertionFailedException: null argument; at org.eclipse.jface.util.Assert.isNotNull(Assert.java:139) at org.eclipse.jface.util.Assert.isNotNull(Assert.java:116) at org.eclipse.jface.viewers.StructuredViewer.assertElementsNotNull (StructuredViewer.java:219) at org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedElements (AbstractTreeViewer.java:1323) at org.eclipse.ui.views.navigator.ResourceNavigator.restoreState (ResourceNavigator.java:915) at org.eclipse.ui.views.navigator.ResourceNavigator.createPartControl (ResourceNavigator.java:263) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:161) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1127) at org.eclipse.core.runtime.Platform.run(Platform.java:464) at org.eclipse.ui.internal.PartPane.createChildControl(PartPane.java:157) at org.eclipse.ui.internal.ViewPane.createChildControl(ViewPane.java:211) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:206) at org.eclipse.ui.internal.ViewPane.createControl(ViewPane.java:190) at org.eclipse.ui.internal.PartTabFolder.createPartTab(PartTabFolder.java:253) at org.eclipse.ui.internal.PartTabFolder.createControl(PartTabFolder.java:225) at org.eclipse.ui.internal.PartSashContainer.createControl (PartSashContainer.java:192) at org.eclipse.ui.internal.PerspectivePresentation.activate (PerspectivePresentation.java:130) at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:724) at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:1826) at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:1590) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.internal.WorkbenchWindow.setActivePage (WorkbenchWindow.java:1577) at org.eclipse.ui.internal.WorkbenchWindow.restoreState (WorkbenchWindow.java:1432) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1239) at org.eclipse.ui.internal.Workbench.access$7(Workbench.java:1208) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:1128) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1127) at org.eclipse.core.runtime.Platform.run(Platform.java:464) at org.eclipse.ui.internal.Workbench.openPreviousWorkbenchState (Workbench.java:1080) at org.eclipse.ui.internal.Workbench.init(Workbench.java:858) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1358) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:237) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:299) at org.eclipse.core.launcher.Main.run(Main.java:767) at org.eclipse.core.launcher.Main.main(Main.java:601)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
IMemento filtersMem = memento.createChild(TAG_FILTERS);
		for (Iterator iter = allFilters.iterator(); iter.hasNext();) {
			String element = (String) iter.next();
			IMemento child = filtersMem.createChild(TAG_FILTER);
			child.putString(TAG_ELEMENT, element);
			child.putString(TAG_IS_ENABLED, String.valueOf(selectedFilters.contains(element)));
		}		
		if (frameList.getCurrentIndex() > 0) {
			
			TreeFrame currentFrame = (TreeFrame) frameList.getCurrentFrame();
			IMemento frameMemento = memento.createChild(TAG_CURRENT_FRAME);
			currentFrame.saveState(frameMemento);
		}
		else {			
			
			Object expandedElements[] = viewer.getVisibleExpandedElements();
			if (expandedElements.length > 0) {
				IMemento expandedMem = memento.createChild(TAG_EXPANDED);
				for (int i = 0; i < expandedElements.length; i++) {
					IMemento elementMem = expandedMem.createChild(TAG_ELEMENT);
					elementMem.putString(
						TAG_PATH,
						((IResource) expandedElements[i]).getFullPath().toString());
				}
			}
			
			Object elements[] = ((IStructuredSelection) viewer.getSelection()).toArray();
			if (elements.length > 0) {
				IMemento selectionMem = memento.createChild(TAG_SELECTION);
				for (int i = 0; i < elements.length; i++) {