Bug 2244607 - [abrt] antlr4-4.10.1-7.fc38: Uncaught exception java.lang.NullPointerException in method org.antlr.v4.Tool.main()
Summary: [abrt] antlr4-4.10.1-7.fc38: Uncaught exception java.lang.NullPointerExceptio...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: antlr4-project
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:9b136523784da3f56dca9583c62...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-17 09:45 UTC by 747500
Modified: 2024-05-31 08:47 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-05-31 08:47:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (734 bytes, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details
File: mountinfo (3.87 KB, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details
File: open_fds (1000 bytes, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details
File: namespaces (171 bytes, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details
File: environ (4.64 KB, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details
File: jvm_environment (1.12 KB, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details
File: backtrace (1.73 KB, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details
File: cpuinfo (3.03 KB, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details
File: DataLens.g4 (6.26 KB, text/plain)
2023-10-17 09:45 UTC, 747500
no flags Details

Description 747500 2023-10-17 09:45:31 UTC
Description of problem:
$ antlr4 -Dlanguage=TypeScript ./DataLens.g4

JavaScript works, TypeScript does not

DataLens.g4 attached

Version-Release number of selected component:
antlr4-4.10.1-7.fc38

Additional info:
reporter:       libreport-2.17.11
kernel:         6.5.6-200.fc38.x86_64
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-c9652b40-2253-44f5-b2d5-0a5039ebecc6.scope
uid:            1000
reason:         Uncaught exception java.lang.NullPointerException in method org.antlr.v4.Tool.main()
cmdline:        /usr/lib/jvm/jre-17-openjdk/bin/java -agentpath:/usr/lib/abrt-java-connector/libabrt-java-connector.so=abrt=on, -classpath /usr/share/java/antlr4/antlr4.jar:/usr/share/java/antlr3-runtime.jar:/usr/share/java/antlr4/antlr4-runtime.jar:/usr/share/java/stringtemplate4/ST4.jar:/usr/share/java/treelayout/org.abego.treelayout.core.jar org.antlr.v4.Tool -Dlanguage=TypeScript DataLens.g4
executable:     /usr/share/java/antlr4/antlr4.jar
pid:            124638
abrt-java-connector: 1.3.2
java_executable: /usr/lib/jvm/java-17-openjdk-17.0.8.0.7-1.fc38.x86_64/bin/java
package:        antlr4-4.10.1-7.fc38
pkg_vendor:     Fedora Project
pkg_fingerprint: 809A 8D7C EB10 B464
runlevel:       N 5

Truncated backtrace:
Exception in thread "main" java.lang.NullPointerException: Cannot read field "tool" because "g" is null
	at org.antlr.v4.codegen.CodeGenerator.create(CodeGenerator.java:58) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/codegen/CodeGenerator.class]
	at org.antlr.v4.analysis.LeftRecursiveRuleAnalyzer.loadPrecRuleTemplates(LeftRecursiveRuleAnalyzer.java:87) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.class]
	at org.antlr.v4.analysis.LeftRecursiveRuleAnalyzer.<init>(LeftRecursiveRuleAnalyzer.java:76) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.class]
	at org.antlr.v4.analysis.LeftRecursiveRuleTransformer.translateLeftRecursiveRule(LeftRecursiveRuleTransformer.java:101) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/analysis/LeftRecursiveRuleTransformer.class]
	at org.antlr.v4.analysis.LeftRecursiveRuleTransformer.translateLeftRecursiveRules(LeftRecursiveRuleTransformer.java:71) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/analysis/LeftRecursiveRuleTransformer.class]
	at org.antlr.v4.semantics.SemanticPipeline.process(SemanticPipeline.java:71) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/semantics/SemanticPipeline.class]
	at org.antlr.v4.Tool.processNonCombinedGrammar(Tool.java:376) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/Tool.class]
	at org.antlr.v4.Tool.process(Tool.java:363) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/Tool.class]
	at org.antlr.v4.Tool.processGrammarsOnCommandLine(Tool.java:322) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/Tool.class]
	at org.antlr.v4.Tool.main(Tool.java:166) [jar:file:/usr/share/java/antlr4/antlr4.jar!/org/antlr/v4/Tool.class]

Comment 1 747500 2023-10-17 09:45:36 UTC
Created attachment 1994284 [details]
File: os_info

Comment 2 747500 2023-10-17 09:45:38 UTC
Created attachment 1994285 [details]
File: mountinfo

Comment 3 747500 2023-10-17 09:45:39 UTC
Created attachment 1994286 [details]
File: open_fds

Comment 4 747500 2023-10-17 09:45:41 UTC
Created attachment 1994287 [details]
File: namespaces

Comment 5 747500 2023-10-17 09:45:43 UTC
Created attachment 1994288 [details]
File: environ

Comment 6 747500 2023-10-17 09:45:45 UTC
Created attachment 1994289 [details]
File: jvm_environment

Comment 7 747500 2023-10-17 09:45:47 UTC
Created attachment 1994290 [details]
File: backtrace

Comment 8 747500 2023-10-17 09:45:49 UTC
Created attachment 1994291 [details]
File: cpuinfo

Comment 9 747500 2023-10-17 09:45:51 UTC
Created attachment 1994292 [details]
File: DataLens.g4

Comment 10 Jerry James 2023-10-17 16:45:31 UTC
There is no TypeScript code generator in antlr4 version 4.10.1, which is what we currently have in Fedora.  The exception you got is because upstream didn't handle a missing code generator correctly.  We need to update to version 4.11 or later to get that code generator.  However, I have been unable to update due to bug 2224119.  As soon as the Go packages can handle an update, I will proceed.

Comment 11 Aoife Moloney 2024-05-31 08:47:20 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.