You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following valid LF program gives an NPE coming from the CLI code.
Contents of file ExtendsBugInside.lf:
target C
reactor C(
period: time(5 ms)
) {
timer t(0, period)
}
reactor A(
period: time(5 ms)
) {
a = new C(period = period)
}
Contents of file ExtendsBug.lf:
target C
import A from "ExtendsBugInside.lf"
reactor B extends A {}
main reactor {
a = new B()
}
Result of trying to compile:
ealmac:C eal$ lfc src/rosace/ExtendsBug.lf
lfc: fatal error: An unexpected error occurred:
java.lang.NullPointerException: Cannot invoke "org.eclipse.emf.common.util.URI.isPlatform()" because "uri" is null
at org.lflang.util.FileUtil.toIPath(FileUtil.java:88)
at org.lflang.util.FileUtil.toPath(FileUtil.java:71)
at org.lflang.cli.CliBase.validateResource(CliBase.java:225)
at org.lflang.cli.Lfc.invokeGenerator(Lfc.java:193)
at org.lflang.cli.Lfc.run(Lfc.java:165)
at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.lflang.cli.CliBase.cliMain(CliBase.java:103)
at org.lflang.cli.Lfc.main(Lfc.java:150)
at org.lflang.cli.Lfc.main(Lfc.java:140)
The text was updated successfully, but these errors were encountered:
The lfc tool currently fails with an NPE if an issue is reported without an
associated resource (see #1650).
This PR fixes this NPE, but not the source of the error in the program mentioned
in #1650.
The following valid LF program gives an NPE coming from the CLI code.
Contents of file
ExtendsBugInside.lf
:Contents of file
ExtendsBug.lf
:Result of trying to compile:
The text was updated successfully, but these errors were encountered: