Whenever I open an editor (not only Spoofax editor) i get a NPE. It appears to be caused by the check to determine whether the transform menu should be shown. Here’s a truncated stack of the crash, which happens sometimes when opening the editor:

	java.lang.NullPointerException
	  at org.strategoxt.imp.runtime.services.menus.MenuEnabledTester.test(MenuEnabledTester.java:27)
	  at org.eclipse.core.internal.expressions.Property.test(Property.java:58)
	  at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)
	  at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
	  at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:72)
	  at org.eclipse.core.internal.expressions.ReferenceExpression.evaluate(ReferenceExpression.java:70)
	  at org.eclipse.e4.ui.internal.workbench.ContributionsAnalyzer.isVisible(ContributionsAnalyzer.java:248)
	  at org.eclipse.e4.ui.workbench.renderers.swt.ToolBarContributionRecord.computeVisibility(ToolBarContributionRecord.java:114)
	  at org.eclipse.e4.ui.workbench.renderers.swt.ToolBarContributionRecord.updateVisibility(ToolBarContributionRecord.java:68)
	  at org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer$6.changed(ToolBarManagerRenderer.java:352)
	  at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:110)
	  at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:328)
	  at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:342)
	  at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:625)
	  at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener$2.run(ShellActivationListener.java:120)
	  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	  at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.activate(ShellActivationListener.java:117)
	  at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.handleEvent(ShellActivationListener.java:73)
	  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	  at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1074)
	  at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4135)
	  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
	  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
	  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1462)
	  at org.eclipse.swt.widgets.Shell.windowDidBecomeKey(Shell.java:2130)
	  at org.eclipse.swt.widgets.Display.windowProc(Display.java:5543)
              ….

Once this happens, it will happen with every opening of an editor, until the Eclipse instance is restarted.

Submitted by Vlad Vergu on 29 October 2013 at 20:50

On 29 October 2013 at 20:50 Vlad Vergu tagged @oskarvanrest

On 29 October 2013 at 21:32 Oskar van Rest commented:

The tester should only be invoked if the active part is an instance of SpoofaxEditor, as declared in the plugin.xml. Can you please try updating your unstable/nightly Spoofax install and let me know if it still happens? Also, what version of Eclipse do you use (Indigo/Juno/Kepler)?


On 20 December 2013 at 16:15 Eelco Visser commented:

This seems to be solved in nightly (December 20, 2013) with Kepler Service Release 1


On 20 December 2013 at 16:15 Eelco Visser closed this issue.

Log in to post comments