Server crash when trying to access a value in map when using tuple as key

Summary

When you have a tuple with arrays in it and uses the first array in that tuple as a key to a map that takes in a tuple with two int the server will crash. The player will not be able to move and on the network stats it’s says 0 packages from the server.

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Stability

Steps to Reproduce

Try to run this code and the server will crash
test_device := class(creative_device):

var TestMap : [tuple(int, int)]int = map{}
OnBegin<override>()<suspends>:void=
    Sleep(5.0)
    if(set TestMap[(1,1)] = 1):
    Variable := (array{1,1}, array{}, array{}, array{})
    if(PlatformThatNeedChange := TestMap[Variable(0)]):

Expected Result

The verse compiler should throw an error/warning at this line of code if(PlatformThatNeedChange := TestMap[Variable(0)]): and says that an array can’t be used as a key in a map where it expect a tuple. And if only a warning is thrown the server should not crash and the else statement should be run because it should see " if(PlatformThatNeedChange := TestMap[Variable(0)]):" as a failure.

Observed Result

The server crash/freeze until you get kicked out and you need to start a new session

Platform(s)

PC UEFN

We’ll get someone to take a look.

We were able to duplicate this here; the ticket number for reference: SOL-7281

Thank you for the report!

1 Like