Skip to content

Hand detection errors in different places #91

@Alexees

Description

@Alexees

When detecting and losing hands, I receive about 3 different errors completely at random.
In the MRKT-Quest_BasicSetup scene I randomly get spammed with this because the Controller is null:

NullReferenceException: Object reference not set to an instance of an object
Microsoft.MixedReality.Toolkit.Input.LinePointer.get_IsInteractionEnabled () (at Assets/MixedRealityToolkit/MRTK/SDK/Features/UX/Scripts/Pointers/LinePointer.cs:56)
Microsoft.MixedReality.Toolkit.Input.MixedRealityInputModule.Process () (at Assets/MixedRealityToolkit/MRTK/Services/InputSystem/MixedRealityInputModule.cs:123)
UnityEngine.EventSystems.EventSystem.Update () (at C:/Program Files/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

Since I am not using the shipped but the official teleport pointer. That one is also causing two errors every now and then:

TeleportCursor.cs: 96
Debug.LogError($"{pointer.GetType().Name} has not been registered! " + pointer.PointerId);

This is because the FocusProvider does not have the requested pointer. And finally:

TeleportPointer.cs: 355
                    if (eventData.SourceId == InputSourceParent.SourceId &&
                    eventData.Handedness == Handedness &&
                    eventData.MixedRealityInputAction == teleportAction)

This is because InputSourceParent is null by the time this is called.

In sum of the errors lead to the pointers still being active for at a least one frame (the first error can get spammed quite a lot) after a source has been lost.
It was beyond me to find out why this is. Most of the missing references happen for objects that shouldn't be in the dictionary they were iterated over because of them being altered in OnSourceDetected and OnSourceLost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions