Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Continuous error(Keep getting a bug whenever I do something)
Continuous error [message #1748169] Sun, 20 November 2016 01:21 Go to next message
Poker 1st is currently offline Poker 1stFriend
Messages: 1
Registered: November 2016
Junior Member
Hey guys,
I am kinda new to eclipse, and java development in general, so forgive me if what I say is not "program correct"

I have been having some issues with eclipse neon. Whenever I try to do anything, be it creating a new project, moving to an old one, or simply trying to export a jar, I keep getting a java.lang.nullpointerexception error pop up in front of me, even if what I am doing is not in the system editor.
I looked in the error log, and here is the full error it gives me with each one:
 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(HashMap.java:338)
	at java.util.HashMap.get(HashMap.java:556)
	at java.util.Collections$SynchronizedMap.get(Collections.java:2584)
	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.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$1.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.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:474)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2170)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:843)
	at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:820)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:795)
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:596)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:766)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1493)
	at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:882)
	at org.eclipse.jface.viewers.AbstractTreeViewer$3.treeExpanded(AbstractTreeViewer.java:1505)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:133)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4248)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1501)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1509)
	at org.eclipse.swt.widgets.TreeItem.sendExpand(TreeItem.java:1050)
	at org.eclipse.swt.widgets.Tree.expandItem_expandChildren(Tree.java:1278)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5988)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227)
	at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1135)
	at org.eclipse.swt.widgets.Tree.mouseDownSuper(Tree.java:2102)
	at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1127)
	at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2616)
	at org.eclipse.swt.widgets.Tree.mouseDown(Tree.java:2069)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5725)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227)
	at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2140)
	at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2402)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5789)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5218)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5367)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3695)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.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$5.run(Workbench.java:687)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	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)


I would just like to have eclipse not give me that error whenever I try to do anything in it. I do not know how to get rid of it, can somebody help please?

Thank you!
Re: Continuous error [message #1748190 is a reply to message #1748169] Mon, 21 November 2016 06:36 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30206
Registered: July 2009
Senior Member
I appears the exception is thrown from ProgramImageDescriptor.hashCode because the filename is null.

public int hashCode() {
return filename.hashCode() + offset;
}

The only place I see that constructs such an instance that could pass in null for the filename to the constructor of ProgramImageDescriptor is in org.eclipse.ui.internal.registry.EditorRegistry.readEditors(Map<String, IEditorDescriptor>) here:

ImageDescriptor descriptor;
if (editor.getProgram() == null) {
descriptor = new ProgramImageDescriptor(editor
.getFileName(), 0);

You mention a "System Editor". Did you register some system editor yourself?

In the worst case, start Eclipse with a new fresh workspace and hopefully the problem won't occur there. You can always import any project from the old workspace into the new workspace. Keep track of what you might do (especially in terms of registering external editor) that makes the problem come back again...
Previous Topic:Packaging Eclipse for VDI
Next Topic:Why do all posts in the Java Tools forum need moderator approval?
Goto Forum:
  


Current Time: Tue Jun 18 13:01:31 GMT 2019

Powered by FUDForum. Page generated in 0.03003 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top