Eclipse Oxygen & org.eclipse.jface 给出 NullPointerException 对话框

Eclipse Oxygen & org.eclipse.jface giving NullPointerException dialog

我已经在网上和这里对这个进行了深入研究。我试过清理项目和 eclipse -clean 和其他一些东西,但到目前为止,没有任何乐趣。我也不能把它与任何事件联系起来;它似乎突然开始发生。一段时间以来,这一直是 Eclipse Oxygen 的稳定使用。如果我切换到 Mars.1 或 Neon,我会得到相同的结果,让我认为这是一个工作区问题,但我不知道 Eclipse 的 'guts' 是否适合进入并开始四处乱逛。老实说,这对我来说看起来像一个腐败的罐子之类的。

当我在 Project Explorer 中展开我的 C++ 项目之一时,错误日志中出现了乱七八糟的情况。如果您不介意不断出现的 "Problem Occurred" 对话框通知您 java.lang.NullPointerException,一切似乎都正常。我唯一看得见的错误是我的 C++ 文件旁边不再有图标。右键单击 Git 存储库 选项卡中的某些元素也会导致问题。

我没有安装任何新东西。没有插件、编辑器等。我会继续打击这个小鬼,但与此同时,这里有一个示例错误日志条目:

eclipse.buildId=4.7.0.I20160915-0230
java.version=1.8.0_101
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

org.eclipse.jface
Error
Fri Oct 28 10:46:41 CDT 2016
Problems occurred when invoking code from plug-in: "org.eclipse.jface".

java.lang.NullPointerException
    at org.eclipse.ui.internal.misc.ProgramImageDescriptor.hashCode(ProgramImageDescriptor.java:74)
    at org.eclipse.jdt.ui.JavaElementImageDescriptor.hashCode(JavaElementImageDescriptor.java:207)
    at java.util.HashMap.hash(Unknown Source)
    at java.util.HashMap.get(Unknown Source)
    at java.util.Collections$SynchronizedMap.get(Unknown Source)
    at org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry.get(ImageDescriptorRegistry.java:57)
    at org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.getImageLabel(JavaElementImageProvider.java:104)
    at org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider.getImageLabel(JavaElementImageProvider.java:98)
    at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getImage(JavaUILabelProvider.java:142)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerLabelProvider.getImage(PackageExplorerLabelProvider.java:137)
    at org.eclipse.jdt.internal.ui.navigator.JavaNavigatorLabelProvider.getImage(JavaNavigatorLabelProvider.java:134)
    at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.findImage(NavigatorContentServiceLabelProvider.java:199)
    at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.getColumnImage(NavigatorContentServiceLabelProvider.java:107)
    at org.eclipse.ui.internal.navigator.NavigatorContentServiceLabelProvider.getImage(NavigatorContentServiceLabelProvider.java:99)
    at org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider$StyledLabelProviderAdapter.getImage(NavigatorDecoratingLabelProvider.java:57)
    at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.getImage(DelegatingStyledCellLabelProvider.java:195)
    at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.getImage(DecoratingStyledCellLabelProvider.java:168)
    at org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.update(DelegatingStyledCellLabelProvider.java:121)
    at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.update(DecoratingStyledCellLabelProvider.java:131)
    at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:141)
    at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:949)
    at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:118)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil.run(JFaceUtil.java:50)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
    at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1029)
    at org.eclipse.ui.navigator.CommonViewer.doUpdateItem(CommonViewer.java:401)
    at org.eclipse.ui.internal.navigator.resources.ResourceToItemsMapper.updateItem(ResourceToItemsMapper.java:150)
    at org.eclipse.ui.internal.navigator.resources.ResourceToItemsMapper.objectChanged(ResourceToItemsMapper.java:138)
    at org.eclipse.ui.navigator.CommonViewer.handleLabelProviderChanged(CommonViewer.java:225)
    at org.eclipse.jface.viewers.ContentViewer.labelProviderChanged(ContentViewer.java:99)
    at org.eclipse.jface.viewers.BaseLabelProvider.run(BaseLabelProvider.java:72)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil.run(JFaceUtil.java:50)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
    at org.eclipse.jface.viewers.BaseLabelProvider.fireLabelProviderChanged(BaseLabelProvider.java:69)
    at org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider.lambda[=11=](DecoratingStyledCellLabelProvider.java:75)
    at org.eclipse.ui.internal.decorators.DecoratorManager.run(DecoratorManager.java:374)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.decorators.DecoratorManager.fireListener(DecoratorManager.java:371)
    at org.eclipse.ui.internal.decorators.DecorationScheduler.runInUIThread(DecorationScheduler.java:511)
    at org.eclipse.ui.progress.UIJob.run(UIJob.java:97)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4203)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench.run(Workbench.java:692)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    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.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

这看起来像 Eclipse 错误 502514

如果我正确地阅读了该错误,则编辑器注册表会因市场代码中的问题而损坏。通过首选项中的文件关联可能会修复它(错误报告中有更多详细信息)。

该错误已在 Eclipse Neon.2 (4.6.2) 中标记为已修复。修复可能在最近发布的 Eclipse Oxygen Milestone 3 (4.7M3)