Project: SWT
Bug 273570 Unable to create view ID org.eclipse.jdt.ui.PackageExplorer: An unexpected exception was thrown. in existing workspace only
Reported: 2009-04-24 06:21:46 | Status: resolved fixed

After JAX09/EclipseForum I downloaded Eclipse 3.5M6 form Mac in various forms carbon/cocoa/cocoa-64bit. When opening an existing workspace last edited in 3.4.2 I received this error and the PackageExplorer refuses to open. This does not occur when opening/creating a new workspace. -- Error Details -- Date: Fri Apr 24 12:04:13 CEST 2009 Message: Unable to create view ID org.eclipse.jdt.ui.PackageExplorer: An unexpected exception was thrown. Severity: Error Plugin: org.eclipse.ui.workbench Session Data: eclipse.buildId=I20090313-0100 java.version=1.5.0_16 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=nl_NL Framework arguments: -keyring /Users/maarten/.eclipse_keyring -showlocation Command-line arguments: -os macosx -ws cocoa -arch x86 -keyring /Users/maarten/.eclipse_keyring -consoleLog -showlocation Exception Stack Trace: java.lang.NullPointerException at org.eclipse.swt.program.Program.getProgram(Program.java:152) at org.eclipse.swt.program.Program.getPrograms(Program.java:194) at org.eclipse.ui.internal.registry.EditorDescriptor.findProgram(EditorDescriptor.java:163) at org.eclipse.ui.internal.registry.EditorDescriptor.loadValues(EditorDescriptor.java:458) at org.eclipse.ui.internal.registry.EditorRegistry.readEditors(EditorRegistry.java:669) at org.eclipse.ui.internal.registry.EditorRegistry.loadAssociations(EditorRegistry.java:916) at org.eclipse.ui.internal.registry.EditorRegistry.initializeFromStorage(EditorRegistry.java:580) at org.eclipse.ui.internal.registry.EditorRegistry.<init>(EditorRegistry.java:164) at org.eclipse.ui.internal.WorkbenchPlugin.getEditorRegistry(WorkbenchPlugin.java:454) at org.eclipse.ui.internal.Workbench.getEditorRegistry(Workbench.java:1154) at org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider.<init>(AppearanceAwareLabelProvider.java:47) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerLabelProvider.<init>(PackageExplorerLabelProvider.java:53) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.createLabelProvider(PackageExplorerPart.java:635) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.setProviders(PackageExplorerPart.java:582) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.createPartControl(PackageExplorerPart.java:480) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:371) at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:230) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPage.java:1242) at org.eclipse.ui.internal.WorkbenchPage.updateActivePart(WorkbenchPage.java:1226) at org.eclipse.ui.internal.WorkbenchPage.handleDeferredEvents(WorkbenchPage.java:1417) at org.eclipse.ui.internal.WorkbenchPage.deferUpdates(WorkbenchPage.java:1406) at org.eclipse.ui.internal.WorkbenchPage.access$14(WorkbenchPage.java:1397) at org.eclipse.ui.internal.WorkbenchPage$15.runWithException(WorkbenchPage.java:3294) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3168) at org.eclipse.swt.widgets.Display.observerProc(Display.java:2828) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:3838) at org.eclipse.swt.widgets.Display.applicationProc(Display.java:3957) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:75) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2871) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803) at org.eclipse.ui.internal.Workbench$28.runWithException(Workbench.java:1372) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3168) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2880) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2304) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284)

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java