Using 'callable' type as an argument crashes your game

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Stability

Summary

This function signature crashes your game instantly
RegisterAgentEvent(Agent: agent, Cancelable: cancelable):void=

This doesn’t crash (but doesn’t work either)
RegisterAgentEvent(Agent: agent, Cancelable: any):void=

Only crashes if your code contains the function BEFORE starting session

Steps to Reproduce

Use cancelable or subtype(cancelable) as a function argument

Expected Result

Code should work, or we should have a compiler error?

Observed Result

Game crashes consistently

Crash Logs

[2023.09.19-10.18.14:048][518]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.$SolarisSignatureFunctionOuter:Function_114:__verse_0xB2CDDD72_Argument’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:048][518]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.$SolarisSignatureFunctionOuter:Function_118:__verse_0xB2CDDD72_Argument’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:048][518]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.$SolarisSignatureFunctionOuter:Function_159:__verse_0xB2CDDD72_Argument’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:048][518]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.$SolarisSignatureFunctionOuter:Function_163:__verse_0xB2CDDD72_Argument’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:048][518]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.$SolarisSignatureFunctionOuter:Function_22:__verse_0xB2CDDD72_Argument’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:048][518]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.$SolarisSignatureFunctionOuter:Function_84:__verse_0xB2CDDD72_Argument’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:048][518]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.$SolarisSignatureFunctionOuter:Function_98:__verse_0xB2CDDD72_Argument’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:048][518]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.forttag_io:_L_2fprojects_2eepicgames_2ecom_2f__1e92b1f74dea05f9a70ffdbf2424c1a7_2fforttag__io_N_RRegisterAgentEvent_L_Nagent_M_Ncancelable_R:__verse_0xB2CDDD72_Argument’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:053][519]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.task_forttag_io$__OnPlayerStartedGame_L_Nplayer_R:$ExprResult_10’; perhaps the USTRUCT() was renamed or deleted?
[2023.09.19-10.18.14:053][519]LogProperty: Error: Struct type unknown for property ‘StructProperty /057ffb95-420d-2c66-9ab3-52a66a617b38/_Verse/forttag_io.task_forttag_io$__OnPlayerStartedGame_L_Nplayer_R:$ExprResult_209’; perhaps the USTRUCT() was renamed or deleted?

Platform(s)

PC

Additional Notes

# Module import path: /Verse.org/Verse

This module doesn’t need to be imported ?

I replaced the method with this one

RegisterAgentEvent(Agent: agent, MethodToSubscribeTo: subscribable(t), SubscriberMethod : t -> void where t:type):void=

It seem to be working this way :man_shrugging:

1 Like