Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

goclipse open definition fails with java.lang.NullPointerException in eclipse #167

Closed
jatinlodhia opened this issue Oct 30, 2015 · 8 comments

Comments

@jatinlodhia
Copy link

When I try to open definition for anything in my go code I get an error dialog saying: Internal error executing 'Open definition (go oracle)'. This used to work about a few days ago and suddenly stopped working. Heres the exception from my workspace log file:

!ENTRY com.googlecode.goclipse.core 4 0 2015-10-30 11:33:14.541
!MESSAGE Internal error executing Open definition (go oracle).
!STACK 0
java.lang.NullPointerException
at com.googlecode.goclipse.ui.actions.GoOracleOpenDefinitionOperation.getByteOffsetForInvocationEncoding(GoOracleOpenDefinitionOperation.java:61)
at com.googlecode.goclipse.ui.actions.GoOracleOpenDefinitionOperation.prepareOperation(GoOracleOpenDefinitionOperation.java:54)
at melnorme.lang.ide.ui.actions.AbstractUIOperation.execute(AbstractUIOperation.java:68)
at melnorme.lang.ide.ui.actions.AbstractUIOperation.executeAndHandle(AbstractUIOperation.java:53)
at com.googlecode.goclipse.ui.editor.text.GoHyperlinkDetector2$GoElementHyperlink.open(GoHyperlinkDetector2.java:48)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseUp(HyperlinkManager.java:436)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1327)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

@bruno-medeiros
Copy link
Contributor

Hum, I can see why the exception would happen, but even if I fix it, the Open Definition operation will not work in this case. And I can't replicate it. What file are you opening? Is the file in the workspace or is it external?

@jatinlodhia
Copy link
Author

The file is in the workspace. I cant even open definitions that are in the same package or file. Basically I cant open absolutely any definitions. This was not the case a few days back. Not sure what changed suddenly.

@bruno-medeiros
Copy link
Contributor

Hum, that's quite strange, I can't see why it would be the case. Can you start with attaching the Error Log, and the Configuration Log please ( see https://github.com/GoClipse/goclipse/blob/master/CONTRIBUTING.md )

@lionelmessi
Copy link

I am also facing the same issue, it always shows the same error. How can i help ?

@bruno-medeiros
Copy link
Contributor

@lionelmessi See above, I'd like the Error Log, and the Configuration Log please ( see https://github.com/GoClipse/goclipse/blob/master/CONTRIBUTING.md ).

Also, open the Properties of the file in the Eclipse Project Explorer, and send a screenshot. (something like this http://i.imgur.com/OH3ghSx.png )

@lionelmessi
Copy link

I had to put entire go folder under Gclipse project, then the issue gets resolved. If I only put my project in workspace, it crashes.

@bruno-medeiros
Copy link
Contributor

I think I've been able to replicate this. Is the go file you used in a linked folder, when this error occurs?

@bruno-medeiros
Copy link
Contributor

Nevermind, this doesn't even need Workspace linked folders to happen. I get it now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants