Description
Hi,
I am getting this error when trying to test GoLang.
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "de.jplag.golang.JPlagGoListener$GoBlockContext.getEnd()" because the return value of "de.jplag.golang.JPlagGoListener.getCurrentContext()" is null
at de.jplag.golang.JPlagGoListener.visitTerminal(JPlagGoListener.java:475)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:29)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:36)
at org.antlr.v4.runtime.tree.ParseTreeWalker.walk(ParseTreeWalker.java:36)
at de.jplag.golang.GoParserAdapter.parseFile(GoParserAdapter.java:50)
at de.jplag.golang.GoParserAdapter.parse(GoParserAdapter.java:30)
at de.jplag.golang.Language.parse(Language.java:47)
at de.jplag.Submission.parse(Submission.java:252)
at de.jplag.SubmissionSet.parseSubmissions(SubmissionSet.java:147)
at de.jplag.SubmissionSet.parseAllSubmissions(SubmissionSet.java:103)
at de.jplag.SubmissionSet.(SubmissionSet.java:45)
at de.jplag.SubmissionSetBuilder.buildSubmissionSet(SubmissionSetBuilder.java:78)
at de.jplag.JPlag.run(JPlag.java:43)
at de.jplag.CLI.main(CLI.java:88)
Apologies if I am missing a dependency / have not read the docs properly.
Am using Jar file and same error for 4.00 and 4.10. OS is Windows 10 and I am using Java 17 JRE
Thanks,
Sion
Activity
sh1670 commentedon Jan 2, 2023
Think it was because some of the submissions were using post 1.17 syntax
tsaglam commentedon Jan 9, 2023
This would make sense! Sadly, we are limited by the version of our ANTLR grammar regarding what syntax we can parse. The grammars are largely taken from https://github.com/antlr/grammars-v4/.
sh1670 commentedon Jan 9, 2023
Thanks.