Unintentional Persistence of Data

Summary

Elements added in @editable arrays persist after the editable attribute is removed from the field

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

  1. Create an empty @editable array of Ints in a Verse device.
  2. In the editor, assign 2 elements to the array.
  3. Go back and remove the @editable attribute so that the field is no longer visible in-editor.
  4. Write a print debug statement to output the length of the array on game start.

Expected Result

The print statement should show the array as being empty.

Observed Result

The print statement will show the array as having two elements.

Platform(s)

windows

Additional Notes

This will cause the Verse server to crash if trying to access the array element when it is a class, since you’d be trying to access null values (if there are fields that aren’t instantiated in the class), and this is a per verse device instance problem, either adding the @editable attribute back to the affected fields and clearing the array in-editor or replacing the device with a new instance will fix this.