World crash when connecting `DynamicVariableObjectInput<Slot>` into `FireOnRefChange<Slot>` ProtoFlux node and then reparenting the nodes into a DynamicVariableSpace after the referenced dynamic slot has been destroyed #1347
Plugging a destroyed slot ref into FireOnRefChange<Slot> under the following conditions causes a world crash.
To Reproduce
Link to public repro folder: resrec:///U-Nytra/R-F824528305BBB70CDD09A61F41D07C33D9F528EB8FC3A9C418BDF874363F3E15
In the folder there are two items. One of them is called Test Root and this is the one which causes the crash. The other is called Test Root With Workaround with a workaround applied which avoids the crash.
1) Spawn the Test Root item from the folder.
2) Open the spawned slot in an inspector and select the Space child slot.
3) Create a new EmptyObject slot and drop the reference to it into the Target dynamic reference variable.
4) Destroy the EmptyObject.
5) Reparent the Flux slot to be a child of the Space slot.
6) World crashes.
Expected behavior
World does not crash.
Screenshots
This is the only ProtoFlux needed to make this happen and it happens when the referenced dynamic slot has been destroyed.
Describe the bug?
Plugging a destroyed slot ref into
FireOnRefChange<Slot>
under the following conditions causes a world crash.To Reproduce
Link to public repro folder:
resrec:///U-Nytra/R-F824528305BBB70CDD09A61F41D07C33D9F528EB8FC3A9C418BDF874363F3E15
In the folder there are two items. One of them is called
Test Root
and this is the one which causes the crash. The other is calledTest Root With Workaround
with a workaround applied which avoids the crash.1) Spawn the
Test Root
item from the folder.2) Open the spawned slot in an inspector and select the
Space
child slot.3) Create a new EmptyObject slot and drop the reference to it into the
Target
dynamic reference variable.4) Destroy the EmptyObject.
5) Reparent the
Flux
slot to be a child of theSpace
slot.6) World crashes.
Expected behavior
World does not crash.
Screenshots
This is the only ProtoFlux needed to make this happen and it happens when the referenced dynamic slot has been destroyed.
Resonite Version Number
Beta 2024.2.12.1430
What Platforms does this occur on?
Windows
What headset if any do you use?
Quest 2
Log Files
DESKTOP-H976HO2 - 2024.2.12.1430 - 2024-02-13 20_07_58.log
Additional Context
I believe this is related to this issue where the destruction of the slot does not trigger a update: https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1296
I also think this crash is related: https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/156
Reporters
Nytra (discord: nytra)