芭蕾舞女演员生成错误,并带有代码生成器空指针异常

时间:2018-07-20 00:58:32

标签: wso2 ballerina

Ballerina构建包/失败,并显示

  

芭蕾舞女演员:哦,不,确实出了点问题。坏。伤心。

ballerina-internal.log文件具有以下编译时错误。

ERROR {org.ballerinalang.launcher.Main} - null java.lang.NullPointerException
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.generateFinallyInstructions(CodeGenerator.java:3311)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.generateFinallyInstructions(CodeGenerator.java:3304)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.visit(CodeGenerator.java:547)
at org.wso2.ballerinalang.compiler.tree.statements.BLangReturn.accept(BLangReturn.java:44)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.genNode(CodeGenerator.java:1386)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.visit(CodeGenerator.java:494)
at org.wso2.ballerinalang.compiler.tree.statements.BLangBlockStmt.accept(BLangBlockStmt.java:54)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.genNode(CodeGenerator.java:1386)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.visit(CodeGenerator.java:2662)
at org.wso2.ballerinalang.compiler.tree.statements.BLangIf.accept(BLangIf.java:53)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.genNode(CodeGenerator.java:1386)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.visit(CodeGenerator.java:494)
at org.wso2.ballerinalang.compiler.tree.statements.BLangBlockStmt.accept(BLangBlockStmt.java:54)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.genNode(CodeGenerator.java:1386)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.processWorker(CodeGenerator.java:1653)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.visitInvokableNode(CodeGenerator.java:1598)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.visit(CodeGenerator.java:482)
at org.wso2.ballerinalang.compiler.tree.BLangFunction.accept(BLangFunction.java:66)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.genNode(CodeGenerator.java:1386)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.lambda$visit$225(CodeGenerator.java:443)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.visit(CodeGenerator.java:443)
at org.wso2.ballerinalang.compiler.tree.BLangPackage.accept(BLangPackage.java:150)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.genNode(CodeGenerator.java:1386)
at org.wso2.ballerinalang.compiler.codegen.CodeGenerator.generateBALO(CodeGenerator.java:358)
at org.wso2.ballerinalang.compiler.CompilerDriver.codegen(CompilerDriver.java:200)
at org.wso2.ballerinalang.compiler.CompilerDriver.compile(CompilerDriver.java:172)
at org.wso2.ballerinalang.compiler.CompilerDriver.compilePackageSymbol(CompilerDriver.java:139)
at org.wso2.ballerinalang.compiler.CompilerDriver.compilePackage(CompilerDriver.java:106)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.wso2.ballerinalang.compiler.Compiler.compilePackages(Compiler.java:154)
at org.wso2.ballerinalang.compiler.Compiler.compilePackage(Compiler.java:173)
at org.wso2.ballerinalang.compiler.Compiler.compile(Compiler.java:85)
at org.wso2.ballerinalang.compiler.Compiler.build(Compiler.java:94)
at org.ballerinalang.packerina.BuilderUtils.compileWithTestsAndWrite(BuilderUtils.java:63)
at org.ballerinalang.packerina.cmd.BuildCommand.execute(BuildCommand.java:97)
at java.util.Optional.ifPresent(Optional.java:159)
at org.ballerinalang.launcher.Main.main(Main.java:66)

我检查了代码,如果BLangStatement.statementLink可以分配空值,则可能会发生这种情况。可以为该值分配空值吗?

1 个答案:

答案 0 :(得分:2)

这看起来像是产品中的错误。请在https://github.com/ballerina-platform/ballerina-lang

上发布问题以及如何重现该问题