Project: Eclipse_Platform_UI
Bug 13198 Unable to add Word document to project
Reported: 2002-04-10 07:39:15 | Status: resolved fixed

Build version: 20020404, 20020409 OS: WindowsXP Traditional Chinese, Office 2000 SR-1 Premium Traditional Chinese Sympton: When adding a Test.doc to a project, first the following error occurs Unable to create part. Test.doc Then internal error with this stack trace: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:96) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.jface.window.Window.runEventLoop(Window.java:538) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:37) at org.eclipse.ui.internal.PartPane$1.handleException(PartPane.java:59) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:437) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:840) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:51) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:93) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:223) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:83) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:307) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:280) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1567) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1458) at org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard.performFinish (BasicNewFileResourceWizard.java:95) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:570) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:311) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:356) 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.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.jface.window.Window.runEventLoop(Window.java:538) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.internal.NewWizardShortcutAction.run (NewWizardShortcutAction.java:79) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:836) at org.eclipse.ui.internal.Workbench.run(Workbench.java:819) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) 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:190) at org.eclipse.core.launcher.Main.run(Main.java:549) at org.eclipse.core.launcher.Main.main(Main.java:390) *** Stack trace of contained exception *** java.lang.NullPointerException at org.eclipse.ui.internal.editorsupport.OleEditor.oleActivate (OleEditor.java:535) at org.eclipse.ui.internal.editorsupport.OleEditor.access$3 (OleEditor.java:529) at org.eclipse.ui.internal.editorsupport.OleEditor$5.run (OleEditor.java:100) 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:1389) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1211) at org.eclipse.jface.window.Window.runEventLoop(Window.java:538) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.jface.dialogs.MessageDialog.openError (MessageDialog.java:318) at org.eclipse.ui.internal.SafeRunnableAdapter.handleException (SafeRunnableAdapter.java:37) at org.eclipse.ui.internal.PartPane$1.handleException(PartPane.java:59) at org.eclipse.core.internal.runtime.InternalPlatform.handleException (InternalPlatform.java:437) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:840) at org.eclipse.core.runtime.Platform.run(Platform.java:411) at org.eclipse.ui.internal.PartPane.createChildControl (PartPane.java:51) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:93) at org.eclipse.ui.internal.EditorWorkbook.createPage (EditorWorkbook.java:223) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:83) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:43) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:307) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:280) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1567) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1458) at org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard.performFinish (BasicNewFileResourceWizard.java:95) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:570) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:311) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:356) 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.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.jface.window.Window.runEventLoop(Window.java:538) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.internal.NewWizardShortcutAction.run (NewWizardShortcutAction.java:79) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:836) at org.eclipse.ui.internal.Workbench.run(Workbench.java:819) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) 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:190) at org.eclipse.core.launcher.Main.run(Main.java:549) at org.eclipse.core.launcher.Main.main(Main.java:390) After closing the error dialog, another internal error comes up: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Widget.error(Widget.java:368) at org.eclipse.swt.widgets.Control.getDisplay(Control.java:698) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java:571) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:299) at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:332) at org.eclipse.ui.internal.editorsupport.OleEditor.setFocus (OleEditor.java:523) at org.eclipse.ui.internal.EditorPresentation.setVisibleEditor (EditorPresentation.java:362) at org.eclipse.ui.internal.EditorPresentation.openEditor (EditorPresentation.java:309) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:468) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:56) at org.eclipse.ui.internal.EditorManager.openInternalEditor (EditorManager.java:460) at org.eclipse.ui.internal.EditorManager.openEditor (EditorManager.java:280) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1567) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:1458) at org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard.performFinish (BasicNewFileResourceWizard.java:95) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:570) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:311) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:356) 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.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.jface.window.Window.runEventLoop(Window.java:538) at org.eclipse.jface.window.Window.open(Window.java:525) at org.eclipse.ui.internal.NewWizardShortcutAction.run (NewWizardShortcutAction.java:79) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:836) at org.eclipse.ui.internal.Workbench.run(Workbench.java:819) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) 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:190) at org.eclipse.core.launcher.Main.run(Main.java:549) at org.eclipse.core.launcher.Main.main(Main.java:390)

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI Editor Support/org/eclipse/ui/internal/editorsupport/OleEditor.java bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorPane.java bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorWorkbook.java bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/ExceptionHandler.java bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/dialogs/InternalErrorDialog.java