Listenable subscription from a class definition block crashes UEFN

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

If a class definition subscribes to a listenable within a block-expression, a somewhat strange crash will occur (elaborated below, under Observed Result).

Steps to Reproduce

Build this Verse-code and attempt to launch a session, and/or close down UEFN and attempt to re-open the project to observe the crash.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

offending_subclass := class<concrete>:

    @editable
    Button : button_device = button_device{}

    block:
        Init() # Comment out this line to avoid crashing

    Init()<transacts>:void=
        Button.InteractedWithEvent.Subscribe(OnPress)

    OnPress(Agent : agent):void=
        Print("Button pressed")

crashing_init_demo := class(creative_device):

    @editable
    OffendingSubclass : offending_subclass = offending_subclass{}

    OnBegin<override>()<suspends>:void=
        block:

Expected Result

I thought calling the Init-method from a block-expression would be a good way to avoid forgetting to call the Init-method from the outside scope, so ideally, this would be supported if possible. Otherwise, the IDE and/or compiler should probably alert the user and handle the error without crashing.

Observed Result

The IDE will not indicate that this is disallowed, and the Verse-code will build without error, but when launching a session, it will hang either on the loading-screen or within the creative lobby (the one with the golden rift). UEFN will not immediately crash, but if UEFN is closed, it will crash upon opening the project again, throwing this error message:

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000000
UnrealEditorFortnite_Win64_Shipping (repeats 82 times)
kernel32
ntdll

Platform(s)

Windows 11, UEFN 29.10