Open mpmxyz opened 6 months ago
Related probably to https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/1296#issue-2116694353
Semi-related as you could also recreate this bug with a Store
. It just needs more steps to follow through as you first have to initialize the variable with an impulse, delete the slot and then connect the drive.
Yes I think it's actually a very generic problem with slot references not being nulled when destroyed, causing a bunch of crashes in different scenarios
The question is if you want to null references when destroyed or if you want to ignore destroyed slots when used as an argument.
I think the second option is more realistic as it is a very complex and possibly cpu/memory-consuming problem to keep track where a reference has been used. (better to just replace all x==null
checks with x==null || x.IsDestroyed()
)
Approaching this at the data storage would also be a valid solution. (check for destroy status before returning value)
But this may be against the design of keeping Protoflux separate from FrooxEngine if it needs integration into Local
s and Store
s.
Doing a check for ElementExists is better as that covers the null case and the destroyed case
Headless is constantly crashing potentially because of this, here's latest log
Describe the bug?
When a slot field is driven and its value is changed to a destroyed slot the session is crashed. (i.e. from reading a dynamic variable or
Store
)To Reproduce
Read Dynamic Slot
to theReference Drive<Slot>
Expected behavior
Drive target should be assigned null or the destroyed object but there shouldn't be a crash.
Screenshots
No response
Resonite Version Number
2024.3.1.1178
What Platforms does this occur on?
Windows
What headset if any do you use?
Desktop
Log Files
ANONYM - 2024.3.1.1178 - 2024-03-03 15_56_00.log
Additional Context
No response
Reporters
No response