Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE when running a file with no main method defined #1585

Closed
mwu-tow opened this issue Mar 17, 2021 · 2 comments · Fixed by #1588
Closed

ICE when running a file with no main method defined #1585

mwu-tow opened this issue Mar 17, 2021 · 2 comments · Fixed by #1588
Assignees
Labels
p-high Should be completed in the next sprint

Comments

@mwu-tow
Copy link
Contributor

mwu-tow commented Mar 17, 2021

The following triggers internal compiler error:

type x

Output:

Exception in thread "main" org.graalvm.polyglot.PolyglotException: java.lang.NullPointerException
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageContext$ToHostValueNode.execute(PolyglotLanguageContext.java:859)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropCodeCache$AbstractInvokeNode.executeShared(PolyglotValue.java:2158)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropCodeCache$InvokeNode.executeImpl(PolyglotValue.java:2198)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:119)
        at org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:550)
        at org.enso.polyglot.Module.getMethod(Module.scala:31)
        at org.enso.runner.Main$.runMain(Main.scala:387)
        at org.enso.runner.Main$.runSingleFile(Main.scala:326)
        at org.enso.runner.Main$.run(Main.scala:309)
        at org.enso.runner.Main$.main(Main.scala:556)
        at org.enso.runner.Main.main(Main.scala)
Original Internal Error:
java.lang.NullPointerException
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotLanguageContext$ToHostValueNode.execute(PolyglotLanguageContext.java:859)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropCodeCache$AbstractInvokeNode.executeShared(PolyglotValue.java:2158)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropCodeCache$InvokeNode.executeImpl(PolyglotValue.java:2198)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:119)
        at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:591)
        at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:562)
        at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:512)
        at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:496)
        at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalRuntimeSupport.callProfiled(GraalRuntimeSupport.java:136)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropValue.invoke(PolyglotValue.java:2898)
        at org.graalvm.sdk/org.graalvm.polyglot.Value.invokeMember(Value.java:550)
        at org.enso.polyglot.Module.getMethod(Module.scala:31)
        at org.enso.runner.Main$.runMain(Main.scala:387)
        at org.enso.runner.Main$.runSingleFile(Main.scala:326)
        at org.enso.runner.Main$.run(Main.scala:309)
        at org.enso.runner.Main$.main(Main.scala:556)
        at org.enso.runner.Main.main(Main.scala)
Caused by: Attached Guest Language Frames (1)

Enso Version

0.2.7

@mwu-tow mwu-tow changed the title ICE when type is not a valid referent name ICE when defining a type Mar 17, 2021
@mwu-tow
Copy link
Contributor Author

mwu-tow commented Mar 17, 2021

I first thought it is due to a name but the following ICEs as well:

from Standard.Base import all

type Foo
    type Bar

@mwu-tow
Copy link
Contributor Author

mwu-tow commented Mar 17, 2021

Nah, these are actually due to missing main.

@mwu-tow mwu-tow changed the title ICE when defining a type ICE when running a file with no main method defined Mar 17, 2021
@iamrecursion iamrecursion self-assigned this Mar 17, 2021
@iamrecursion iamrecursion added Difficulty: Core Contributor p-high Should be completed in the next sprint labels Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-high Should be completed in the next sprint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants