Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
193 stars 9 forks source link

Setting the CharacterRoot on a CharacterController to the world's Root Slot while it has a SimulatingUser causes a world crash #3861

Closed Nytra closed 1 year ago

Nytra commented 1 year ago

Describe the bug?

Title.

I am running mods on this install, but I am 99% sure that this crash happens even without mods, because I was in a world that someone else without mods was hosting and we did this and it crashed for both of us.

The actual exception:

06:41:27.514 ( 90 FPS) Unhandled Exception when updating world: Nytra World. State Running, Refresh Stage: PhysicsUpdate, Init State: Finished, SyncTick 1333, StateVersion: 2666 Dumped world state to: G:\NeosCache\Cache\2ertahhset8irp3r.lz4bson System.NullReferenceException: Object reference not set to an instance of an object at FrooxEngine.Slot.set_GlobalPosition (BaseX.float3 value) [0x0001a] in :0 at FrooxEngine.CharacterController.Physics_PreContactDispatch () [0x0012e] in :0 at (wrapper delegate-invoke) .invoke_void() at FrooxEngine.PhysicsSimulation.FinishUpdate () [0x000ad] in :0 at FrooxEngine.PhysicsManager.Update () [0x00071] in :0 at FrooxEngine.World.RefreshStep () [0x002c2] in :0 at FrooxEngine.World.Refresh () [0x00073] in :0 at FrooxEngine.WorldManager.UpdateStep (System.Double maxMilliseconds) [0x004a3] in :0

at void BaseX.UniLog.Error(string message, bool stackTrace) at void FrooxEngine.WorldManager.UpdateStep(double maxMilliseconds) at bool FrooxEngine.WorldManager.RunUpdateLoop(double maxMilliseconds) at void FrooxEngine.Engine.UpdateStep(double maxMilliseconds) at void FrooxEngine.Engine.RunUpdateLoop(double maxMilliseconds) at void FrooxEngineRunner.FrooxEngineRunner.Update_Patch1(FrooxEngineRunner)

Relevant issues

None.

To Reproduce

Create a CharacterController on an EmptyObject. Give it a SimulatingUser. Set CharacterRoot to the world's Root Slot. World crashes.

Expected behavior

No world crash. The component should just not accept the Root Slot as an input for CharacterRoot, or it should handle the exception in some way.

Log Files

DESKTOP-H976HO2 - 2022.1.28.1310 - 2023-03-13 14_50_17.log

Screenshots

No response

How often does it happen?

Always

Does the bug persist after restarting Neos?

Yes

Neos Version Number

2022.1.28.1310

What Platforms does this occur on?

Windows

Link to Reproduction Item/World

No response

Did this work before?

I Don't Know

If it worked before, on which build?

No response

Additional context

No response

Reporters

Nytra (Nytra#8595)

Nytra commented 1 year ago

Closed because I'm going to post this as a security issue instead via a moderation ticket.