Summary
When using a function to return an object reference inline during a SET call the compiler (as of v37.0) appears to reference the object incorrectly and causes a hard crash.
The crash presents itself as a network timeout. No logs appear in editor unless a sleep is used to allow it to flush to editor prior to crash.
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
After v37.0 this example setup/code now crashes:
- Compile the verse code below.
- Put āmain_deviceā and āsome_deviceā in world.
- Set main_deviceās āSomeDeviceā to the instance of āsome_deviceā in world.
- Run session, then āStart Gameā.
- Experience crash.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
some_device<public> := class(creative_device):
var FooInt:int = 0
getter_class<public> := class:
Device<public> : ?some_device = false
Get<public>() : some_device =
if (ValidDevice := Device?) :
return ValidDevice
Err("No valid device")
main_device<public> := class(creative_device) :
@editable SomeDevice : ?some_device = false
var Getter : getter_class = getter_class {}
OnBegin<override>()<suspends>:void =
set Getter = getter_class{Device:=SomeDevice}
WorksFine()
Crash()
WorksFine()<suspends>:void =
LocalVar := Getter.Get() # using a local var works around the issue
set LocalVar.FooInt = 123
Print("I WORK! :D")
Crash()<suspends>:void =
Print("About to crash...")
Sleep(2.0) # needed to flush above log...
set Getter.Get().FooInt = 123 # -- CRASH -- #
# - Verse unrecoverable error:
# ErrRuntime_Internal: An internal runtime error occurred. There is no other information available.
# (Internal error encountered: Attempted to reference 'self' as an addressable property..)
# -- Network timeout here --
Print("I'm never reached!")
Expected Result
- Act the same as it did prior to v37.0. (i.e. do not crash)
Observed Result
Not only does it crash, but itās nasty. The user recieves a network timeout error, logs are not flushed to editor, and users recieve no information about what happened or why.
Platform(s)
windows
Island Code
9287-5846-6590
Video
- Video shows running a 37.0 session with above code/setup.
- Player freezes in-place and game crashes.