+
Skip to content

Compiler crashes when using a dynamic divert that expects a parameter #955

@lgarczyn

Description

@lgarczyn

Minimum reproduction

-> Call(-> Lambda)

=== Call(->lambda)
~lambda()
-> DONE

=== Lambda(a)
-> DONE

Error

System.Exception: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') (Internal story path: Lambda.0)
 ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Ink.Runtime.StoryState.PopEvaluationStack() in /Users/phish/inkle/projects/ink/ink-engine-runtime/StoryState.cs:line 1156
   at Ink.Runtime.Story.PerformLogicAndFlowControl(Object contentObj) in /Users/phish/inkle/projects/ink/ink-engine-runtime/Story.cs:line 1661
   at Ink.Runtime.Story.Step() in /Users/phish/inkle/projects/ink/ink-engine-runtime/Story.cs:line 910
   at Ink.Runtime.Story.ContinueSingleStep() in /Users/phish/inkle/projects/ink/ink-engine-runtime/Story.cs:line 596
   at Ink.Runtime.Story.ContinueInternal(Single millisecsLimitAsync) in /Users/phish/inkle/projects/ink/ink-engine-runtime/Story.cs:line 467
   at Ink.CommandLinePlayer.EvaluateStory()
   at Ink.CommandLinePlayer.Begin()
   at Ink.CommandLineTool..ctor(String[] args)
   --- End of inner exception stack trace ---
   at Ink.CommandLineTool..ctor(String[] args)
   at Ink.CommandLineTool.Main(String[] args)

Versions:

Inky version: 0.15.1

ink version: 1.2.0

inkjs version: 2.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载