Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
132 stars 2 forks source link

Re-installing a locomotion module kills the world #2600

Open SpaceAnon opened 1 month ago

SpaceAnon commented 1 month ago

Describe the bug?

Installing a locomotion module onto a user, deleting the locomotion module, and then attempting to re-install and switch to that same locomotion module instantly crashes the current world and boots you back to your local home if it is triggered by something such as a collider event. Triggering the re-equip using a impulse proxy will not crash the world, but the locomotion module will still not work correctly.

To Reproduce

Below is a quick demo rig where the blue collider area will equip a renamed copy of the walk locomotion to the user that collides with it while the red collider area will remove that locomotion module from the user. By simply touching the blue sphere, the red sphere, and then the blue sphere again the world will crash and replicate this issue:

resrec:///U-Joliair/R-c2e7eba4-1417-42f9-b06d-606d18ae65b8

Expected behavior

The locomotion module correctly re-installs, is fully useable, and does not crash the world.

Screenshots

No response

Resonite Version Number

2024.7.15.1359

What Platforms does this occur on?

Windows

What headset if any do you use?

No response

Log Files

ORION_X2 - 2024.7.15.1359 - 2024-07-17 00_25_59.log

Additional Context

No response

Reporters

Joliair

shiftyscales commented 1 month ago

Replicated. Thank you for providing a simplified replication object. :)

Relevant exception seems to be: SHIFTY-LAPTOP - 2024.7.17.1173 - 2024-07-18 09_16_59.log

9:21:19 AM.089 (165 FPS)    Unhandled Exception when updating world: Local. State Running, Refresh Stage: ProtoFluxEvents, Init State: Finished, SyncTick 25976, StateVersion: 51952
Dumped world state to: C:\Users\Laura\QC\Test1\Cache\honrx8cs0ehzrdo9.lz4bson
System.NullReferenceException: Object reference not set to an instance of an object
  at ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Locomotion.SwitchLocomotionModule+<>c__DisplayClass5_0.<Run>b__0 (FrooxEngine.ILocomotionModule m) [0x0001f] in <8ea95285d6234ff39d08f86f05c48b4c>:0 
  at System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) [0x0003f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Locomotion.SwitchLocomotionModule.Run (FrooxEngine.ProtoFlux.FrooxEngineContext context) [0x00085] in <8ea95285d6234ff39d08f86f05c48b4c>:0 
  at ProtoFlux.Runtimes.Execution.SyncOperationSequence`1[C].ExecuteSync (C context) [0x00031] in <73d8ff99d53044acbb81bdc4e997e873>:0 
  at ProtoFlux.Runtimes.Execution.ExecutionRuntime`1[C].ExecuteSequence (ProtoFlux.Core.ISyncOperation operation, C context) [0x00034] in <73d8ff99d53044acbb81bdc4e997e873>:0 
  at ProtoFlux.Runtimes.Execution.ExecutionRuntime`1[C].Execute (ProtoFlux.Core.ISyncOperation action, ProtoFlux.Runtimes.Execution.ExecutionContext context) [0x00012] in <73d8ff99d53044acbb81bdc4e997e873>:0 
  at ProtoFlux.Runtimes.Execution.Nodes.FrooxEngine.Physics.ContactEventNode.HandleEvent (FrooxEngine.ProtoFlux.FrooxEngineContext context, System.Object other) [0x00012] in <8ea95285d6234ff39d08f86f05c48b4c>:0 
  at ProtoFlux.Runtimes.Execution.ExecutionEventDispatcher`1[C].DispatchEvents (ProtoFlux.Runtimes.Execution.ExecutionRuntime`1[C] runtime, C context) [0x0005b] in <73d8ff99d53044acbb81bdc4e997e873>:0 
  at FrooxEngine.ProtoFlux.ProtoFluxNodeGroup.RunNodeEvents () [0x00030] in <3f998194f20442f194cd5ae1b8fb51ae>:0 
  at FrooxEngine.ProtoFlux.ProtoFluxController.RunNodeEvents () [0x0002d] in <3f998194f20442f194cd5ae1b8fb51ae>:0 
  at FrooxEngine.World.RefreshStep () [0x003ff] in <3f998194f20442f194cd5ae1b8fb51ae>:0 
  at FrooxEngine.World.Refresh () [0x00073] in <3f998194f20442f194cd5ae1b8fb51ae>:0 
  at FrooxEngine.WorldManager.UpdateStep () [0x004a3] in <3f998194f20442f194cd5ae1b8fb51ae>:0 

  at System.Environment.get_StackTrace () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at Elements.Core.UniLog.Error (System.String message, System.Boolean stackTrace) [0x00000] in <ae1b038a0ab44964a8516e4bf0e4c0b0>:0 
  at FrooxEngine.WorldManager.UpdateStep () [0x00000] in <3f998194f20442f194cd5ae1b8fb51ae>:0 
  at FrooxEngine.WorldManager.RunUpdateLoop () [0x00000] in <3f998194f20442f194cd5ae1b8fb51ae>:0 
  at FrooxEngine.Engine.UpdateStep () [0x00000] in <3f998194f20442f194cd5ae1b8fb51ae>:0 
  at FrooxEngine.Engine.RunUpdateLoop () [0x00000] in <3f998194f20442f194cd5ae1b8fb51ae>:0 
  at UnityFrooxEngineRunner.FrooxEngineRunner.UpdateFrooxEngine () [0x00000] in <ed1fedb514da46f6a891a6552407664e>:0 
  at UnityFrooxEngineRunner.FrooxEngineRunner.Update () [0x00000] in <ed1fedb514da46f6a891a6552407664e>:0 
SpaceAnon commented 1 month ago

No problem! I'm glad my simplified crash replication object was helpful! ^^

AegisTheWolf commented 1 month ago

Ok were not the only ones experiencing this issue, if needed I can provide an additional example (including some protoflux nodes refusing to function and not crashing me (i wasnt host) trying to make a simple locomotion install/uninstall/reinstall script with a test locomotion. Good to know this issue was made and replicated :3

shiftyscales commented 1 month ago

Is this an issue the content team was running into when making official content? Or was it something being done for personal use, @AegisTheWolf?

AegisTheWolf commented 1 month ago

bit of both though i avoided using locomotion installation/uninstalling in projects since this happens. Lately its been a personal project thats affected by this but I have a feeling we would run into something like this in the future. (example: volumes that install/uninstall locomotion when you enter/exit it)

shiftyscales commented 1 month ago

Are you able to check if the issue occurs when installing/removing the modules directly with Flux, or does the issue require the trigger volume, @AegisTheWolf @SpaceAnon?

AegisTheWolf commented 1 month ago

i tested this with protoflux and it did not function as well (I created a testing object as described by my other comment)

SpaceAnon commented 1 month ago

Like Aegis mentioned you're unable to reinstall the location module if you use flux such as directly pressing a impulse button, but the world-crashing aspect seems to be something more related to the install being triggered by collisions.

I believe I also tested this by attempting to install a different locomotion module after uninstalling/deleting the locomotion module in the test setup and that appeared to behave in the same way. If I had to guess attempting to just delete the locomotion module from under the locomotion module slot doesn't clean up that locomotion module properly and some reference to it remains somewhere.