Project: Eclipse_Platform_UI
Bug 160918 [KeyBindings] Nullpointer exception in Win > Pref > General > Keys
Reported: 2006-10-13 15:20:35 | Status: verified fixed

If I define a new category of extension org.eclipse.ui.commands and dont put any commands in that category I get the following null pointer exception. Steps: 1. Launch IDE in Japanese OS (reproed on both Win32 and MacOSX) 2. Click on "Window" -> "Preferences" 3. In Preferences dailog, click on "Gerneral" -> "Keys" Actual: A pop-up warning saying Error occurs. Please check the error log for more details. If you look up the log file, you have an exception shown bottow Expected: No error. Note: Repro in Japanese-OS only. !ENTRY org.eclipse.jface 4 2 2006-10-07 06:20:35.393 !MESSAGE &#32349;&#21169;&#923;&#32359;&#65392;&#32359;&#65380;&#32349;&#65395; "org.eclipse.jface" &#32314;&#20061;&#65353;&#32314;&#65390;&#32359;&#65395;&#32349;&#65404;&#32349;&#23784;?&#65390;&#35149;&#65399;&#34573;&#36628;&#12306;&#34656;&#22478;&#65377; &#24460;&#8242;&#36875;&#65402;&#36885;&#28312;&#65312;&#32314;&#65406;&#32314;&#21169;&#9670;&#32306;? !STACK 0 java.lang.NullPointerException at org.eclipse.ui.internal.keys.KeysPreferencePage.updateComboCommand(KeysPreferencePage.java:1933) at org.eclipse.ui.internal.keys.KeysPreferencePage.update(KeysPreferencePage.java:1900) at org.eclipse.ui.internal.keys.KeysPreferencePage.setVisible(KeysPreferencePage.java:1868) at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1225) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:439) at org.eclipse.jface.preference.PreferenceDialog$8.selectionChanged(PreferenceDialog.java:661) at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:839) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:843) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:837) at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1143) at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1163) at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:236) at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:230) at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:404) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeysPreferencePage.java