NPE in NewStructureSkipper when triggering completion
Steps to reproduce:
Take the EntityLang generated by the wizard. Replace the context-free syntax with:
context-free syntaxDefinition* -> Start {cons("Module")} "{" Part1 "}" -> Definition {cons("Def")} "part1" -> Part1 {cons("Part1")}
Replace the example module with:
{
p
}Now put the cursor after the p and hit ctrl+space to trigger completion.
This will raise the following NPE:
Internal parsing error: null
java.lang.NullPointerException
at org.spoofax.jsglr.client.NewStructureSkipper.readLine(NewStructureSkipper.java:465)
at org.spoofax.jsglr.client.NewStructureSkipper.readLine(NewStructureSkipper.java:459)
at org.spoofax.jsglr.client.NewStructureSkipper.isScopeClosingLine(NewStructureSkipper.java:440)
at org.spoofax.jsglr.client.NewStructureSkipper.findParentBegin(NewStructureSkipper.java:418)
at org.spoofax.jsglr.client.NewStructureSkipper.getParentSkipSuggestions(NewStructureSkipper.java:139)
at org.spoofax.jsglr.client.RegionRecovery.selectErroneousFragment(RegionRecovery.java:121)
at org.spoofax.jsglr.client.RecoveryConnector.combinedRecover(RecoveryConnector.java:63)
at org.spoofax.jsglr.client.RecoveryConnector.recover(RecoveryConnector.java:48)
at org.spoofax.jsglr.client.SGLR.sglrParse(SGLR.java:292)
at org.spoofax.jsglr.client.SGLR.parse(SGLR.java:271)
at org.strategoxt.imp.runtime.parser.JSGLRI.doParse(JSGLRI.java:163)
at org.strategoxt.imp.runtime.parser.AbstractSGLRI.parse(AbstractSGLRI.java:106)
at org.strategoxt.imp.runtime.parser.SGLRParseController.doParse(SGLRParseController.java:343)
at org.strategoxt.imp.runtime.parser.SGLRParseController.parse(SGLRParseController.java:281)
at org.strategoxt.imp.runtime.parser.SGLRParseController.parse(SGLRParseController.java:1)
at org.strategoxt.imp.runtime.dynamicloading.DynamicParseController.parse(DynamicParseController.java:168)
at org.eclipse.imp.editor.ParserScheduler.run(ParserScheduler.java:86)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)Note: This happens only if there is indentation on the line where completion is triggered. When there is no indentation, there is no NPE.
Edit: This is with Spoofax r22419.
Submitted by Tobi Vollebregt on 22 March 2011 at 12:53
Issue Log
An easier way to reproduce in this duplicate: https://yellowgrass.org/issue/Spoofax/426
bug fixed
Log in to post comments