Project: Eclipse_Platform_UI
Bug 18641 IllegalArg exception while deleting projects/closing editors
Reported: 2002-06-01 17:42:34 | Status: resolved fixed

I just started eclipse up with many editors open (non of them where activated yet) 1) select 3 projects (all JUnit project) 2) execute delete - push yes to delete the contents. Got the message dialog: Error restoring editor. Below is the stack trace with the illegal argument exception. Once you are in this state you can only shutdown. !ENTRY org.eclipse.ui 4 2 Jun 01, 2002 23:47:00.21 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui". !STACK 0 java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:1873) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Widget.error(Widget.java:368) at org.eclipse.swt.widgets.Composite.setTabList(Composite.java:381) at org.eclipse.ui.internal.EditorArea.updateTabList(EditorArea.java:307) at org.eclipse.ui.internal.EditorArea.setActiveWorkbook (EditorArea.java:282) at org.eclipse.ui.internal.EditorArea.setActiveWorkbookFromID (EditorArea.java:291) at org.eclipse.ui.internal.EditorPresentation.setActiveEditorWorkbookFromID (EditorPresentation.java:358) at org.eclipse.ui.internal.EditorManager$7.run(EditorManager.java:816) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:416) at org.eclipse.ui.internal.EditorManager.busyRestoreEditor (EditorManager.java:774) at org.eclipse.ui.internal.EditorManager$6.run(EditorManager.java:764) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:64) at org.eclipse.ui.internal.EditorManager.restoreEditor (EditorManager.java:760) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1141) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorManager.getVisibleEditor (EditorManager.java:275) at org.eclipse.ui.internal.WorkbenchPage.getActiveEditor (WorkbenchPage.java:1100) at org.eclipse.jdt.internal.debug.ui.actions.ManageWatchpointActionDelegate.setEnab ledState(ManageWatchpointActionDelegate.java:282) at org.eclipse.jdt.internal.debug.ui.actions.AbstractManageBreakpointActionDelegate .update(AbstractManageBreakpointActionDelegate.java:112) at org.eclipse.jdt.internal.debug.ui.actions.ManageBreakpointActionDelegate.selecti onChanged(ManageBreakpointActionDelegate.java:174) at org.eclipse.ui.internal.PluginAction.refreshEnablement (PluginAction.java:170) at org.eclipse.ui.internal.PluginAction.selectionChanged (PluginAction.java:232) at org.eclipse.ui.internal.PluginAction.selectionChanged (PluginAction.java:252) at org.eclipse.ui.internal.AbstractSelectionService$3.run (AbstractSelectionService.java:137) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:416) at org.eclipse.ui.internal.AbstractSelectionService.fireSelection (AbstractSelectionService.java:135) at org.eclipse.ui.internal.AbstractSelectionService.reset (AbstractSelectionService.java:291) at org.eclipse.ui.internal.AbstractSelectionService.partDeactivated (AbstractSelectionService.java:274) at org.eclipse.ui.internal.WWinPartService.partDeactivated (WWinPartService.java:124) at org.eclipse.ui.internal.PartListenerList$4.run (PartListenerList.java:99) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:416) at org.eclipse.ui.internal.PartListenerList.firePartDeactivated (PartListenerList.java:97) at org.eclipse.ui.internal.WorkbenchPage.firePartDeactivated (WorkbenchPage.java:1053) at org.eclipse.ui.internal.WorkbenchPage.onDeactivate (WorkbenchPage.java:1547) at org.eclipse.ui.internal.WorkbenchWindow$7.run (WorkbenchWindow.java:1157) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:64) at org.eclipse.ui.internal.WorkbenchWindow.setActivePage (WorkbenchWindow.java:1152) at org.eclipse.ui.internal.WorkbenchWindow.closeAllPages (WorkbenchWindow.java:394) at org.eclipse.ui.internal.WorkbenchWindow.hardClose (WorkbenchWindow.java:845) at org.eclipse.ui.internal.WorkbenchWindow.busyClose (WorkbenchWindow.java:322) at org.eclipse.ui.internal.WorkbenchWindow.access$3 (WorkbenchWindow.java:311) at org.eclipse.ui.internal.WorkbenchWindow$2.run (WorkbenchWindow.java:367) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:64) at org.eclipse.ui.internal.WorkbenchWindow.close (WorkbenchWindow.java:365) at org.eclipse.jface.window.WindowManager.close(WindowManager.java:103) at org.eclipse.ui.internal.Workbench$2.run(Workbench.java:202) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:416) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:173) at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:150) at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:291) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:64) at org.eclipse.ui.internal.Workbench.close(Workbench.java:289) at org.eclipse.ui.internal.ExceptionHandler.closeWorkbench (ExceptionHandler.java:109) at org.eclipse.ui.internal.ExceptionHandler.handleException (ExceptionHandler.java:94) at org.eclipse.jface.window.Window.runEventLoop(Window.java:561) at org.eclipse.jface.window.Window.open(Window.java:538) at org.eclipse.jface.dialogs.MessageDialog.openInformation (MessageDialog.java:336) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1145) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorManager.getVisibleEditor (EditorManager.java:275) at org.eclipse.ui.internal.WorkbenchPage.getActiveEditor (WorkbenchPage.java:1100) at org.eclipse.jdt.internal.debug.ui.actions.ManageWatchpointActionDelegate.setEnab ledState(ManageWatchpointActionDelegate.java:282) at org.eclipse.jdt.internal.debug.ui.actions.AbstractManageBreakpointActionDelegate .update(AbstractManageBreakpointActionDelegate.java:112) at org.eclipse.jdt.internal.debug.ui.actions.ManageBreakpointActionDelegate.selecti onChanged(ManageBreakpointActionDelegate.java:174) at org.eclipse.ui.internal.PluginAction.refreshEnablement (PluginAction.java:170) at org.eclipse.ui.internal.PluginAction.selectionChanged (PluginAction.java:232) at org.eclipse.ui.internal.PluginAction.selectionChanged (PluginAction.java:252) at org.eclipse.ui.internal.AbstractSelectionService$3.run (AbstractSelectionService.java:137) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:416) at org.eclipse.ui.internal.AbstractSelectionService.fireSelection (AbstractSelectionService.java:135) at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged (AbstractSelectionService.java:50) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1153) at org.eclipse.jface.viewers.StructuredViewer.handleSelect (StructuredViewer.java:544) at org.eclipse.jface.viewers.StructuredViewer$1.widgetSelected (StructuredViewer.java:568) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent (OpenStrategy.java:171) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:168) at org.eclipse.jface.util.OpenStrategy$1.handleEvent (OpenStrategy.java:297) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.jface.window.Window.runEventLoop(Window.java:558) at org.eclipse.jface.window.Window.open(Window.java:538) at org.eclipse.jface.dialogs.MessageDialog.openInformation (MessageDialog.java:336) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1145) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorWorkbook.setVisibleEditor (EditorWorkbook.java:782) at org.eclipse.ui.internal.EditorWorkbook$2.widgetSelected (EditorWorkbook.java:134) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:841) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:634) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:1683) at org.eclipse.swt.custom.CTabFolder.destroyItem(CTabFolder.java:501) at org.eclipse.swt.custom.CTabItem.dispose(CTabItem.java:99) at org.eclipse.ui.internal.EditorWorkbook.removeTab (EditorWorkbook.java:610) at org.eclipse.ui.internal.EditorWorkbook.remove (EditorWorkbook.java:548) at org.eclipse.ui.internal.EditorArea.removeEditor(EditorArea.java:183) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:79) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:60) at org.eclipse.ui.internal.EditorManager.closeEditor (EditorManager.java:114) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:682) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1144) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorWorkbook.setVisibleEditor (EditorWorkbook.java:782) at org.eclipse.ui.internal.EditorWorkbook.remove (EditorWorkbook.java:540) at org.eclipse.ui.internal.EditorArea.removeEditor(EditorArea.java:183) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:79) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:60) at org.eclipse.ui.internal.EditorManager.closeEditor (EditorManager.java:114) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:682) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1144) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorWorkbook.setVisibleEditor (EditorWorkbook.java:782) at org.eclipse.ui.internal.EditorWorkbook.remove (EditorWorkbook.java:540) at org.eclipse.ui.internal.EditorArea.removeEditor(EditorArea.java:183) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:79) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:60) at org.eclipse.ui.internal.EditorManager.closeEditor (EditorManager.java:114) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:682) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1144) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorWorkbook.setVisibleEditor (EditorWorkbook.java:782) at org.eclipse.ui.internal.EditorWorkbook.remove (EditorWorkbook.java:540) at org.eclipse.ui.internal.EditorArea.removeEditor(EditorArea.java:183) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:79) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:60) at org.eclipse.ui.internal.EditorManager.closeEditor (EditorManager.java:114) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:682) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1144) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorManager.getVisibleEditor (EditorManager.java:275) at org.eclipse.ui.internal.WorkbenchPage.getActiveEditor (WorkbenchPage.java:1100) at org.eclipse.jdt.internal.debug.ui.actions.ManageWatchpointActionDelegate.setEnab ledState(ManageWatchpointActionDelegate.java:282) at org.eclipse.jdt.internal.debug.ui.actions.AbstractManageBreakpointActionDelegate .update(AbstractManageBreakpointActionDelegate.java:112) at org.eclipse.jdt.internal.debug.ui.actions.ManageBreakpointActionDelegate.selecti onChanged(ManageBreakpointActionDelegate.java:174) at org.eclipse.ui.internal.PluginAction.refreshEnablement (PluginAction.java:170) at org.eclipse.ui.internal.PluginAction.selectionChanged (PluginAction.java:232) at org.eclipse.ui.internal.PluginAction.selectionChanged (PluginAction.java:252) at org.eclipse.ui.internal.AbstractSelectionService$3.run (AbstractSelectionService.java:137) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:416) at org.eclipse.ui.internal.AbstractSelectionService.fireSelection (AbstractSelectionService.java:135) at org.eclipse.ui.internal.AbstractSelectionService$1.selectionChanged (AbstractSelectionService.java:50) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged (Viewer.java:147) at org.eclipse.jface.viewers.StructuredViewer.updateSelection (StructuredViewer.java:1153) at org.eclipse.jface.viewers.StructuredViewer.handleInvalidSelection (StructuredViewer.java:514) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection (StructuredViewer.java:700) at org.eclipse.jface.viewers.AbstractTreeViewer.remove (AbstractTreeViewer.java:961) at org.eclipse.ui.model.WorkbenchContentProvider.processDelta (WorkbenchContentProvider.java:154) at org.eclipse.ui.model.WorkbenchContentProvider$1.run (WorkbenchContentProvider.java:189) at org.eclipse.ui.internal.UIWorkspaceLock.doPendingWork (UIWorkspaceLock.java:53) at org.eclipse.ui.internal.UIWorkspaceLock.acquire (UIWorkspaceLock.java:38) at org.eclipse.core.internal.resources.WorkManager.checkIn (WorkManager.java:80) at org.eclipse.core.internal.resources.Workspace.prepareOperation (Workspace.java:1311) at org.eclipse.core.internal.resources.Resource.refreshLocal (Resource.java:965) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.createEle mentInfo(CompilationUnitDocumentProvider.java:809) at org.eclipse.ui.texteditor.AbstractDocumentProvider.connect (AbstractDocumentProvider.java:278) at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput (AbstractTextEditor.java:1615) at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput (StatusTextEditor.java:160) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput (JavaEditor.java:546) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput (CompilationUnitEditor.java:1001) at org.eclipse.ui.texteditor.AbstractTextEditor.init (AbstractTextEditor.java:1231) at org.eclipse.ui.internal.EditorManager.createSite (EditorManager.java:547) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:596) at org.eclipse.ui.internal.EditorManager.access$5 (EditorManager.java:592) at org.eclipse.ui.internal.EditorManager$7.run(EditorManager.java:820) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:802) at org.eclipse.core.runtime.Platform.run(Platform.java:416) at org.eclipse.ui.internal.EditorManager.busyRestoreEditor (EditorManager.java:774) at org.eclipse.ui.internal.EditorManager$6.run(EditorManager.java:764) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:64) at org.eclipse.ui.internal.EditorManager.restoreEditor (EditorManager.java:760) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1141) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorWorkbook.setVisibleEditor (EditorWorkbook.java:782) at org.eclipse.ui.internal.EditorWorkbook.remove (EditorWorkbook.java:540) at org.eclipse.ui.internal.EditorArea.removeEditor(EditorArea.java:183) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:79) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:60) at org.eclipse.ui.internal.EditorManager.closeEditor (EditorManager.java:114) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:682) at org.eclipse.ui.internal.EditorManager$Editor.getEditor (EditorManager.java:1144) at org.eclipse.ui.internal.EditorManager$Editor.getPart (EditorManager.java:1133) at org.eclipse.ui.internal.EditorWorkbook.setVisibleEditor (EditorWorkbook.java:782) at org.eclipse.ui.internal.EditorWorkbook.remove (EditorWorkbook.java:540) at org.eclipse.ui.internal.EditorArea.removeEditor(EditorArea.java:183) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:79) at org.eclipse.ui.internal.EditorPresentation.closeEditor (EditorPresentation.java:69) at org.eclipse.ui.internal.EditorManager.closeEditor (EditorManager.java:110) at org.eclipse.ui.internal.WorkbenchPage.closeEditor (WorkbenchPage.java:712) at org.eclipse.ui.texteditor.AbstractTextEditor$8.run (AbstractTextEditor.java:1653) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:29) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:93) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1504) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1292) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block (ModalContext.java:133) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:258) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:335) at org.eclipse.ui.actions.DeleteResourceAction.run (DeleteResourceAction.java:354) at org.eclipse.ui.views.navigator.RefactorActionGroup.handleKeyPressed (RefactorActionGroup.java:113) at org.eclipse.ui.views.navigator.MainActionGroup.handleKeyPressed (MainActionGroup.java:185) at org.eclipse.ui.views.navigator.ResourceNavigator.handleKeyPressed (ResourceNavigator.java:575) at org.eclipse.ui.views.navigator.ResourceNavigator$7.keyPressed (ResourceNavigator.java:308) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:116) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1177) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) 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:244) at org.eclipse.core.launcher.Main.run(Main.java:693) at org.eclipse.core.launcher.Main.main(Main.java:526)

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorManager.java bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorPresentation.java