-
Notifications
You must be signed in to change notification settings - Fork 135
Closed
Description
When requesting Python code evaluation in a Ruby application, which uses multithreading, a NPE is raised in PythonLanguage
. The reason for this seems to be that isWithThread
is only set in PythonLanguage#createContext
and it looks like this is not being called before the code evaluation.
Line of interest
Example Stack trace
Internal error occurred: org.graalvm.polyglot.PolyglotException: org.truffleruby.language.control.RaiseException: <no message> (NullPointerException)
from com.oracle.graal.python.PythonLanguage.isThreadAccessAllowed(PythonLanguage.java:547)
from com.oracle.truffle.api.LanguageAccessor$LanguageImpl.isThreadAccessAllowed(LanguageAccessor.java:233)
from com.oracle.truffle.polyglot.PolyglotLanguageContext.checkThreadAccess(PolyglotLanguageContext.java:269)
from com.oracle.truffle.polyglot.PolyglotLanguageContext.ensureCreated(PolyglotLanguageContext.java:452)
from com.oracle.truffle.polyglot.PolyglotLanguageContext.ensureInitialized(PolyglotLanguageContext.java:531)
from com.oracle.truffle.polyglot.PolyglotContextImpl.getContextInitialized(PolyglotContextImpl.java:362)
from com.oracle.truffle.polyglot.EngineAccessor$EngineImpl.parseForLanguage(EngineAccessor.java:194)
from com.oracle.truffle.api.TruffleLanguage$Env.parsePublic(TruffleLanguage.java:1931)
from org.truffleruby.interop.PolyglotNodes$EvalFileNode.eval(PolyglotNodes.java:128)
from org.truffleruby.interop.PolyglotNodes$EvalFileNode.evalFile(PolyglotNodes.java:122)
from org.truffleruby.interop.PolyglotNodesFactory$EvalFileNodeFactory$EvalFileNodeGen.executeAndSpecialize(PolyglotNodesFactory.java:354)
from org.truffleruby.interop.PolyglotNodesFactory$EvalFileNodeFactory$EvalFileNodeGen.execute(PolyglotNodesFactory.java:336)
from org.truffleruby.language.control.SequenceNode.execute(SequenceNode.java:35)
from org.truffleruby.language.methods.ExceptionTranslatingNode.execute(ExceptionTranslatingNode.java:32)
from org.truffleruby.language.LazyRubyNode.execute(LazyRubyNode.java:43)
from org.truffleruby.language.RubyRootNode.execute(RubyRootNode.java:
...
/cc @janehmueller
Metadata
Metadata
Assignees
Labels
No labels