YarnSpinner: Yarn.Compiler installed from NuGet crashes on CompileFile
What is the current behavior?
Yarn installed from nuget crashes when trying to compile file.
Please provide the steps to reproduce, and if possible a minimal demo of the problem:
Install Yarn.Compiler from nuget and call Compiler.CompileFile with a sample yarn file.
Please tell us about your environment:
- Yarn Spinner Version: I was able to replicate the issue on both 1.1.0 and 1.2.0
- Unity Version: none, using API (with Godot 3.2.1, probably irrelevant)
Other information
Got rid of the error by compiling Yarn.Compiler project from source.
Error and stack trace:
E 0:00:01.933 void YarnSpinnerLexer.CreateIndentIfNeeded(Int32 ): System.MissingMethodException: Method not found: void Antlr4.Runtime.CommonToken..ctor(System.Tuple`2<Antlr4.Runtime.ITokenSource, Antlr4.Runtime.ICharStream>,int,int,int,int)
<C++ Error> Unhandled exception
<C++ Source> :0 @ void YarnSpinnerLexer.CreateIndentIfNeeded(Int32 )()
<Stack Trace> :0 @ void YarnSpinnerLexer.CreateIndentIfNeeded(Int32 )()
:0 @ void YarnSpinnerLexer.HEADER_NEWLINE_action(Antlr4.Runtime.RuleContext , Int32 )()
:0 @ void YarnSpinnerLexer.Action(Antlr4.Runtime.RuleContext , Int32 , Int32 )()
:0 @ void Antlr4.Runtime.Atn.LexerCustomAction.Execute(Antlr4.Runtime.Lexer )()
:0 @ void Antlr4.Runtime.Atn.LexerActionExecutor.Execute(Antlr4.Runtime.Lexer , Antlr4.Runtime.ICharStream , Int32 )()
:0 @ void Antlr4.Runtime.Atn.LexerATNSimulator.Accept(Antlr4.Runtime.ICharStream , Antlr4.Runtime.Atn.LexerActionExecutor , Int32 , Int32 , Int32 , Int32 )()
:0 @ Int32 Antlr4.Runtime.Atn.LexerATNSimulator.FailOrAccept(Antlr4.Runtime.Atn.SimState , Antlr4.Runtime.ICharStream , Antlr4.Runtime.Atn.ATNConfigSet , Int32 )()
:0 @ Int32 Antlr4.Runtime.Atn.LexerATNSimulator.ExecATN(Antlr4.Runtime.ICharStream , Antlr4.Runtime.Dfa.DFAState )()
:0 @ Int32 Antlr4.Runtime.Atn.LexerATNSimulator.Match(Antlr4.Runtime.ICharStream , Int32 )()
:0 @ Antlr4.Runtime.IToken Antlr4.Runtime.Lexer.NextToken()()
:0 @ Antlr4.Runtime.IToken YarnSpinnerLexer.NextToken()()
:0 @ Int32 Antlr4.Runtime.BufferedTokenStream.Fetch(Int32 )()
:0 @ Boolean Antlr4.Runtime.BufferedTokenStream.Sync(Int32 )()
:0 @ void Antlr4.Runtime.BufferedTokenStream.Consume()()
:0 @ Antlr4.Runtime.IToken Antlr4.Runtime.Parser.Consume()()
:0 @ Antlr4.Runtime.IToken Antlr4.Runtime.Parser.Match(Int32 )()
:0 @ YarnSpinnerParser+HeaderContext YarnSpinnerParser.header()()
:0 @ YarnSpinnerParser+NodeContext YarnSpinnerParser.node()()
:0 @ YarnSpinnerParser+DialogueContext YarnSpinnerParser.dialogue()()
:0 @ Yarn.Compiler.Status Yarn.Compiler.Compiler.CompileString(System.String , System.String , Yarn.Program& , System.Collections.Generic.IDictionary`2[System.String,Yarn.Compiler.StringInfo]& )()
:0 @ Yarn.Compiler.Status Yarn.Compiler.Compiler.CompileFile(System.String , Yarn.Program& , System.Collections.Generic.IDictionary`2[System.String,Yarn.Compiler.StringInfo]& )()
TestDialogue.cs:10 @ void TestDialogue.Test()()
Game.cs:14 @ void Game._Ready()()
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 2
- Comments: 15 (2 by maintainers)
Thank you! Will investigate.