Neos-Metaverse / NeosPublic

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

Invalid Slot inputs to Global Transform can result in Red Nodes on its output. #3234

Open iamgreaser opened 3 years ago

iamgreaser commented 3 years ago

Describe the bug?

OK, there's an interesting chain of events here and no title for this issue would be particularly good.

Relevant issues

2219 covers various cases where error output nodes show up.

To Reproduce

See the screenshot for more details.

The chain that I'm going for is this:

Once you have this set up, delete the relevant slot. The Timer node will go red.

A workaround for this is to check to see if the slot's parent is not null. This workaround is visible in the screenshot.

Expected behavior

Two things.

Log Files

Here's the relevant backtrace. It comes from the log file that isn't Player.log.

13:04:56.387 (218 FPS)  Exception in OnTouch() event on Element: ID6870FA00, Type: FrooxEngine.UIX.Canvas, World: [WIP] drive-to-spawn test, IsRemoved: False, IsDestroyed: False, IsDisposed: False, Enabled: True
Element: ID6870EF00, Type: FrooxEngine.Slot, World: [WIP] drive-to-spawn test, IsRemoved: False, Slot name: Canvas, T: [0; 0; 0], R: [0; 0; 0; 1], S: [0.001; 0.001; 0.001], ActiveSelf: True, IsDestroyed: False
Element: ID6870E400, Type: FrooxEngine.Slot, World: [WIP] drive-to-spawn test, IsRemoved: False, Slot name: Visual, T: [0; 0; 0], R: [0; 0; 0; 1], S: [1; 1; 1], ActiveSelf: True, IsDestroyed: False
Element: ID6870BD00, Type: FrooxEngine.Slot, World: [WIP] drive-to-spawn test, IsRemoved: False, Slot name: Impulse Input, T: [-13.47926; 2.188876; -7.447946], R: [-0.0001494626; -0.4837947; -8.911348E-05; 0.8751816], S: [1; 1; 1], ActiveSelf: True, IsDestroyed: False
Element: ID2100, Type: FrooxEngine.Slot, World: [WIP] drive-to-spawn test, IsRemoved: False, Slot name: Root, T: [0; 0; 0], R: [0; 0; 0; 1], S: [1; 1; 1], ActiveSelf: True, IsDestroyed: False
Element: ID0, Type: FrooxEngine.World, World: [WIP] drive-to-spawn test, IsRemoved: False

System.NullReferenceException: Object reference not set to an instance of an object
  at FrooxEngine.Slot.EnsureValidLocal2Global () [0x00010] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.Slot.get_LocalToGlobal_Fast () [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.Slot.get_GlobalPosition () [0x0000a] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.WorldModel.GlobalTransform.OnEvaluate () [0x00010] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.LogixNode.CheckEvaluate () [0x00050] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.Output`1[T].get_Value () [0x00008] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.Output`1[T].get_Content () [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.Input`1[T].EvaluateRaw (T def) [0x0005c] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.Input`1[T].Evaluate (T def) [0x00010] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.Debug.DebugLine.Display () [0x0001a] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.Impulse.Trigger () [0x0001c] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.LogiX.Input.ImpulseInput.ButtonPressed (FrooxEngine.IButton button, FrooxEngine.ButtonEventData eventData) [0x00009] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.ButtonRelay.OnPressed (FrooxEngine.IButton button, FrooxEngine.ButtonEventData eventData) [0x0000f] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.ButtonRelayBase.Pressed (FrooxEngine.IButton button, FrooxEngine.ButtonEventData eventData) [0x00062] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.Button+<>c__DisplayClass65_0.<RunPressed>b__0 (FrooxEngine.IButtonPressReceiver r) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.ContainerWorker`1[C].ForeachComponent[T] (System.Action`1[T] callback, System.Func`2[T,TResult] callbackStopper, System.Boolean cacheItems, System.Boolean excludeDisabled) [0x00034] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.ContainerWorker`1[C].ForeachComponent[T] (System.Action`1[T] callback, System.Boolean cacheItems, System.Boolean exludeDisabled) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.Button.RunPressed (FrooxEngine.ButtonEventData eventData) [0x00067] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.Button.OnPressBegin (FrooxEngine.UIX.Canvas+InteractionData eventData) [0x00035] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.InteractionElement.ProcessEvent (FrooxEngine.UIX.Canvas+InteractionData eventData) [0x00235] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.Canvas.ProcessTouchEvent (FrooxEngine.TouchEventInfo& eventInfo, System.Collections.Generic.List`1[T] filters) [0x00398] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.Canvas.OnTouch (FrooxEngine.TouchEventInfo& eventInfo) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.UIX.Canvas.FrooxEngine.ITouchable.OnTouch (FrooxEngine.TouchEventInfo& eventInfo) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.TouchSource.SendTouchEvent (FrooxEngine.ITouchable touchable, FrooxEngine.TouchEventInfo& touchInfo) [0x00018] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 

   at void BaseX.UniLog.Error(string message, bool stackTrace)
   at void FrooxEngine.DebugManager.Error(object obj, bool stackTrace)
   at void FrooxEngine.TouchSource.SendTouchEvent(ITouchable touchable, in TouchEventInfo touchInfo)
   at void FrooxEngine.TouchSource.UpdateCurrentTouchable(ITouchable touchable, in float3 point, in float3 direction, in float3 directHitPoint, bool touch)
   at void FrooxEngine.TouchSource.UpdateTouch()
   at void FrooxEngine.InteractionLaser.UpdateLaser(Nullable<float> maintainDistance, Nullable<float> overrideSmoothing, Nullable<InteractionOrigin> overrideOrigin, bool targettingOnly)
   at void FrooxEngine.CommonTool.UpdateInteractionAndLaser(bool targettingOnly)
   at void FrooxEngine.CommonTool.OnInputEvaluate()
   at void FrooxEngine.InputGroup.Update(float deltaTime)
   at void FrooxEngine.InputBindingManager.Update()
   at bool FrooxEngine.World.RefreshStep()
   at bool FrooxEngine.World.Refresh()
   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.Update()

  at System.Environment.get_StackTrace () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at FrooxEngineRunner+<>c__DisplayClass38_0.<Start>b__1 (System.String str) [0x00000] in <e5efda6c71a9483b9797805442d08245>:0 
  at BaseX.UniLog.Error (System.String message, System.Boolean stackTrace) [0x00000] in <2aaf5fc3e99f451199b78b531b73a591>:0 
  at FrooxEngine.DebugManager.Error (System.Object obj, System.Boolean stackTrace) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.TouchSource.SendTouchEvent (FrooxEngine.ITouchable touchable, FrooxEngine.TouchEventInfo& touchInfo) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.TouchSource.UpdateCurrentTouchable (FrooxEngine.ITouchable touchable, BaseX.float3& point, BaseX.float3& direction, BaseX.float3& directHitPoint, System.Boolean touch) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.TouchSource.UpdateTouch () [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.InteractionLaser.UpdateLaser (System.Nullable`1[T] maintainDistance, System.Nullable`1[T] overrideSmoothing, System.Nullable`1[T] overrideOrigin, System.Boolean targettingOnly) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.CommonTool.UpdateInteractionAndLaser (System.Boolean targettingOnly) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.CommonTool.OnInputEvaluate () [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.InputGroup.Update (System.Single deltaTime) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.InputBindingManager.Update () [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.World.RefreshStep () [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.World.Refresh () [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.WorldManager.UpdateStep (System.Double maxMilliseconds) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.WorldManager.RunUpdateLoop (System.Double maxMilliseconds) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.Engine.UpdateStep (System.Double maxMilliseconds) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngine.Engine.RunUpdateLoop (System.Double maxMilliseconds) [0x00000] in <b0a4a38cf0ab4414adc8da5f83bd94cf>:0 
  at FrooxEngineRunner.Update () [0x00000] in <e5efda6c71a9483b9797805442d08245>:0 
13:04:56.390 (218 FPS)  Evaluate depth is above zero on LogiX Update

Screenshots

Exact case with workaround applied:

image

How often does it happen?

Always

Does the bug persist after restarting Neos?

Yes

Neos Version Number

2021.10.21.64

What Platforms does this occur on?

Linux

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

GreaseMonkey.

ProbablePrime commented 3 years ago

Thanks for your report.

This doesn't appear to have anything to do with the Debug Line Node but rather the Global Transform Node. Which the log snippet correlates.

Please submit entire log files too, we need information that occurs elsewhere in the log file to fully diagnose your issue.

iamgreaser commented 3 years ago

Pinning down exactly where the bug "should be" is a somewhat difficult philosophical issue, and the bug may actually be that you can store a slot in a dynvar, then delete it, and the dynvar still points to the deleted slot which now no longer tracks back to Root.

I'll get you a suitable log the next time I'm on Neos.

iamgreaser commented 3 years ago

Another screenshot:

image

The object that it's referring to was set up by dragging its reference into the EmptyObject inspector, and the object itself was deleted with the red trash can in its own inspector.

Logs:

...and apparently GitHub doesn't support 7zip.

There's an Updating Relay there, so sorry for the sheer amount of spam in the log.