Skip to content

Error when testing Go code #865

Closed
Closed

Description

@sh1670

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

  1. sh1670 commented on Jan 2, 2023

    @sh1670
    Author

    Think it was because some of the submissions were using post 1.17 syntax

  2. tsaglam commented on Jan 9, 2023

    @tsaglam
    Member

    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/.

  3. sh1670 commented on Jan 9, 2023

    @sh1670
    Author

    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/.

    Thanks.

  4. added
    question
    bug
    minor
    and removed
    bug
    minor
    on Feb 6, 2023
  5. locked and limited conversation to collaborators on Feb 9, 2023
  6. converted this issue into a discussion #922 on Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions