NPE in PolyglotLanguageContext.toHostValue

Adam Kövári kovariadam at gmail.com
Tue Jul 24 11:05:54 UTC 2018


Hello,

I am very interested in learning the Truffle API, I find it really amazing so far.

I am trying to implement a simple expression language [1], based on SimpleLanguage project, but I got stuck and I am not really sure where the problem might be.

Perhaps someone understands what this means?

org.graalvm.polyglot.PolyglotException: java.lang.NullPointerException
        at com.oracle.truffle.api.vm.PolyglotLanguageContext.toHostValue(PolyglotLanguageContext.java:585)
        at com.oracle.truffle.api.vm.PolyglotContextImpl.eval(PolyglotContextImpl.java:789)
        at org.graalvm.polyglot.Context.eval(Context.java:313)
        at org.graalvm.polyglot.Context.eval(Context.java:338)
        at smol.SmolSimpleExpressionTest.unitValueTest(SmolSimpleExpressionTest.java:74)
…


This can be easily reproduced by running:

$ mvn tests

My java version:

$ java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
GraalVM 1.0.0-rc3 (build 25.71-b01-internal-jvmci-0.45, mixed mode)


Would someone be able to advice, any ideas or pointers are most welcome.


Thanks,
Adam

[1] https://github.com/akovari/smol


More information about the graal-dev mailing list