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

[Haxe 4, RC2] Assertion failed in evalContext.ml #8039

Closed
posxposy opened this issue Mar 22, 2019 · 6 comments
Closed

[Haxe 4, RC2] Assertion failed in evalContext.ml #8039

posxposy opened this issue Mar 22, 2019 · 6 comments
Assignees
Milestone

Comments

@posxposy
Copy link

Hello! Thanks for RC2!
Just tried it on my project (JS target), and got this error on compilation:
File "_build/src/macro/eval/evalContext.ml", line 342, characters 2-8: Assertion failed

VSCode output console says this:

File "_build/src/macro/eval/evalContext.ml", line 342, characters 2-8: Assertion failed
Exception while handling Haxe completion response: TypeError: Cannot read property 'split' of null
@Simn
Copy link
Member

Simn commented Mar 22, 2019

Uhm, that's not good...

Could you define the environment variable OCAMLRUNPARAM=b and paste me the stack trace you should be getting when compiling again with that?

@Simn Simn self-assigned this Mar 22, 2019
@Simn Simn added this to the Release 4.0 milestone Mar 22, 2019
@posxposy
Copy link
Author

Maybe the error is coming from my macros. But I don't know how to look deeper into this if there are no errors in Haxe code itself.

Output with OCAMLRUNPARAM=b variable:

Fatal error: exception File "_build/src/macro/eval/evalContext.ml", line 342, characters 2-8: Assertion failed
Raised at file "_build/src/macro/eval/evalContext.ml", line 342, characters 2-14
Called from file "_build/src/macro/macroApi.ml", line 577, characters 10-40
Called from file "_build/src/macro/macroApi.ml", line 664, characters 14-29
Called from file "_build/src/typing/macroContext.ml", line 711, characters 16-37
Called from file "_build/src/typing/macroContext.ml", line 49, characters 2-6
Called from file "_build/src/typing/instanceBuilder.ml", line 55, characters 16-63
Called from file "_build/src/typing/instanceBuilder.ml", line 74, characters 13-18
Called from file "_build/src/context/typecore.ml", line 275, characters 11-14
Called from file "_build/src/core/type.ml", line 630, characters 11-22
Called from file "list.ml", line 88, characters 20-23
Called from file "_build/src/typing/typerBase.ml", line 200, characters 43-58
Called from file "list.ml", line 117, characters 24-34
Called from file "_build/src/typing/typer.ml", line 108, characters 17-40
Called from file "_build/src/typing/typer.ml", line 117, characters 32-41
Called from file "_build/src/typing/typer.ml", line 2359, characters 10-91
Called from file "_build/src/typing/typer.ml", line 2477, characters 10-48
Called from file "_build/src/typing/typer.ml", line 2383, characters 10-35
Called from file "_build/src/typing/typer.ml", line 1432, characters 13-51
Called from file "list.ml", line 88, characters 20-23
Called from file "_build/src/typing/typer.ml", line 1426, characters 10-761
Called from file "_build/src/typing/typer.ml", line 1571, characters 27-94
Called from file "_build/src/typing/typer.ml", line 1574, characters 9-19
Called from file "_build/src/typing/typer.ml", line 2379, characters 10-38
Called from file "_build/src/typing/typer.ml", line 2178, characters 10-56
Called from file "_build/src/typing/typer.ml", line 1571, characters 27-94
Called from file "_build/src/typing/typer.ml", line 1574, characters 9-19
Called from file "_build/src/typing/typer.ml", line 2379, characters 10-38
Called from file "_build/src/typing/typer.ml", line 2178, characters 10-56
Called from file "_build/src/typing/typer.ml", line 1571, characters 27-94
Called from file "_build/src/typing/typer.ml", line 1574, characters 9-19
Called from file "_build/src/typing/typer.ml", line 2379, characters 10-38
Called from file "_build/src/typing/typer.ml", line 1571, characters 27-94
Called from file "_build/src/typing/typer.ml", line 1574, characters 9-19
Called from file "_build/src/typing/typer.ml", line 2379, characters 10-38
Called from file "_build/src/context/typecore.ml" (inlined), line 151, characters 32-64
Called from file "_build/src/typing/typeloadFunction.ml", line 120, characters 2-25
Called from file "std.ml", line 26, characters 6-9
Re-raised at file "std.ml", line 28, characters 23-30
Called from file "_build/src/typing/typer.ml", line 2001, characters 17-85
Called from file "_build/src/context/typecore.ml" (inlined), line 151, characters 32-64
Called from file "_build/src/typing/calls.ml", line 139, characters 11-58
Called from file "_build/src/typing/calls.ml", line 180, characters 12-33
Called from file "_build/src/typing/calls.ml", line 191, characters 14-26
Re-raised at file "_build/src/typing/calls.ml", line 191, characters 73-82
Called from file "_build/src/typing/calls.ml", line 242, characters 15-73
Called from file "_build/src/typing/calls.ml", line 285, characters 23-40
Called from file "_build/src/typing/calls.ml", line 632, characters 25-66
Called from file "_build/src/typing/typer.ml", line 1571, characters 27-94
Called from file "_build/src/typing/typer.ml", line 1574, characters 9-19
Called from file "_build/src/typing/typer.ml", line 2379, characters 10-38
Called from file "_build/src/context/typecore.ml" (inlined), line 151, characters 32-64
Called from file "_build/src/typing/typeloadFunction.ml", line 120, characters 2-25
Called from file "std.ml", line 26, characters 6-9
Re-raised at file "std.ml", line 28, characters 23-30
Called from file "_build/src/typing/typeloadFields.ml", line 1071, characters 21-97
Called from file "_build/src/context/typecore.ml", line 275, characters 11-14
Called from file "_build/src/typing/typeloadFields.ml", line 1455, characters 51-64
Called from file "_build/src/context/typecore.ml", line 261, characters 3-6
Called from file "_build/src/typing/finalization.ml", line 47, characters 1-30
Called from file "_build/src/compiler/main.ml", line 871, characters 2-183
Called from file "_build/src/compiler/main.ml", line 378, characters 3-11
Called from file "_build/src/compiler/main.ml", line 1113, characters 1-35

Tried it on another project and everything compiles successfully (Java target).

@Simn
Copy link
Member

Simn commented Mar 22, 2019

It dies trying to decode the tname field of some TPath. That means the field is missing, or it has a value that isn't a string (possibly null). I'll have to check why this no longer raises a proper error.

@Simn
Copy link
Member

Simn commented Mar 22, 2019

Maybe fixed, could you try with a build from http://build.haxe.org/builds/haxe/ once it's available for your OS? I might re-release rc.2 with this fix because it's pretty bad.

@posxposy
Copy link
Author

Works fine now! No exceptions, no errors.

@Simn
Copy link
Member

Simn commented Apr 1, 2019

Well, this has been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants