Session breaks due to Inline If-statement when modifying class member that is stored as a map value.

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

Assigning a class member variable using an inline if-statement, when the class instance is stored as a value in a map, will completely break the session.

Steps to Reproduce

  1. Define this class
MyClass := class:
    var MyInt : int = 0
  1. Put this somewhere
var TestMap : [string]MyClass = map{"Alice" => MyClass{}, "Bob" => MyClass{}, "Charlie" => MyClass{}}
  1. Put this line in a place that can access TestMap and runs in a creative device
if (set TestMap["Alice"].MyInt = if (1 = 1) {1} else {0}) {}

Expected Result

The variable gets set if the map value exists

Observed Result

Session disconnects and players are kicked to the lobby.
(No verse runtime error)

Platform(s)

Windows 11

Additional Notes

As far as my testing goes this ONLY happened when these conditions are met:

  1. You are setting a member of the value in the map, not setting the value itself
  2. You are setting the value with an INLINE if statement. Separating the if statement will make it work.

The status of FORT-743839 incident has been moved from ‘Ready for QA’ to ‘Closed’. Resolution Reason: ‘Cannot Reproduce’

Thank you for the bug report, @Enebz and sorry for the delay in the reply.

We’ve tried to reproduce the issue as reported, but without success. It is possible that the issue has since been fixed.

Are you able to reproduce the issue with the latest version? If so, is there any other information you could share that could help us reproduce? A complete verse reproduction snippet would be helpful.

Many thanks,
Ben

Sorry for the late response. I will re-attempt and let you know.