Verse code that creates a parameteric/generic closure crashes editor on build or open

Summary

Verse code (see steps to reproduce) crashes the editor

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Stability

Steps to Reproduce

  1. Add the following Verse file to the project:
closure(payload: type, context: type) := class:
    Callback: tuple(payload, context)->void
    Context: context
    Handle(Payload: payload):void=
        Callback(Payload, Context)

MakeClosure<public>(Callback: tuple(payload, context)->void, Context: context where payload: type, context: type):(payload->void)=
    return closure(payload, context) { Callback := Callback, Context := Context }.Handle

arg1 := class {}
arg2 := class {}

test := class:
    Test():void=
        Arg2 := arg2 {}
        Closure := MakeClosure(OnCallback, Arg2)

    OnCallback(Arg1: arg1, Arg2: arg2):void={}
  1. Build Verse

Expected Result

Verse builds successfully, closure works

Observed Result

Editor crashes with the following error:

Unhandled Exception: 0x80000003

UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
UnrealEditorFortnite_Win64_Shipping
kernel32
ntdll

After this crash, editor can no longer be opened for this project, until the file is removed from the project

Platform(s)

Windows

Additional Notes

  • Using type {} syntax instead of -> syntax for function types does not make a difference (still crashes)
  • Setting Verse 1 or Verse 0 on the project does not make a difference (both crash)

We’ll get somoene to take a look, thank you for the detail.

1 Like

JIRA FORT-592189 for tracking.

1 Like