Project: SWT
Bug 62558 Null Pointer when opening Folder in File>Open External File
Reported: 2004-05-17 17:03:46 | Status: verified fixed

Go to the menu and choose, File>Open External File, when the open file dialog comes up select a folder from the left side list and hit open, should get a big long traceback similar to the following org.eclipse.ui.PartInitException[0]: java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:61) at java.io.InputStreamReader.<init>(InputStreamReader.java:80) at org.eclipse.core.internal.filebuffers.JavaTextFileBuffer.setDocumentContent(JavaTextFileBuffer.java:300) at org.eclipse.core.internal.filebuffers.JavaTextFileBuffer.initializeFileBufferContent(JavaTextFileBuffer.java:231) at org.eclipse.core.internal.filebuffers.JavaFileBuffer.create(JavaFileBuffer.java:81) at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:68) at org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:470) at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:414) at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:2507) at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:173) at org.eclipse.ui.texteditor.ExtendedTextEditor.doSetInput(ExtendedTextEditor.java:1067) at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:290) at org.eclipse.ui.texteditor.AbstractTextEditor$14.run(AbstractTextEditor.java:1978) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:302) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:576) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:573) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1606) at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:1993) at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:2011) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:569) at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:633) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:438) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:426) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2129) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2072) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2059) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2054) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2037) at org.eclipse.ui.internal.editors.text.OpenExternalFileAction.run(OpenExternalFileAction.java:115) at org.eclipse.ui.internal.editors.text.OpenExternalFileAction.run(OpenExternalFileAction.java:87) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:269) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:207) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:550) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:502) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:435) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:939) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1953) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1726) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1562) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1536) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:257) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:277) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:239) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:117) 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:267) at org.eclipse.core.launcher.Main.run(Main.java:692) at org.eclipse.core.launcher.Main.main(Main.java:676)

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java