antlr / intellij-plugin-v4

An IntelliJ plugin for ANTLR v4
https://plugins.jetbrains.com/plugin/7358-antlr-v4
BSD 3-Clause "New" or "Revised" License
468 stars 104 forks source link

IntelliJ 2022.1 parser generation issue. #528

Closed hanohrs closed 2 years ago

hanohrs commented 2 years ago

Generating a parser for Hello.g4 in Getting Started with ANTLR v4 failed with a NullPointerException.

Although it says "parser for Hello.g4 generated", nothing is there.

The root cause might be the startup issue, #527.

Stacktrace:

java.lang.NullPointerException
    at org.antlr.intellij.plugin.parsing.RunANTLROnGrammarFile.antlr(RunANTLROnGrammarFile.java:149)
    at org.antlr.intellij.plugin.parsing.RunANTLROnGrammarFile.run(RunANTLROnGrammarFile.java:78)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$8(CoreProgressManager.java:526)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:83)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
    at java.base/java.lang.Thread.run(Thread.java:829)
hanohrs commented 2 years ago

Confirmed that this is a duplicate of #495 and fixed in the snapshot version, "https://github.com/antlr/intellij-plugin-v4/files/8192836/antlr-intellij-plugin-v4-1.18-SNAPSHOT.zip".

I'm sorry for rashly issuing. I hope to use a release version in near future.