MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Spatial Awareness MeshObserver stops working

Open Rakazthas opened this issue 2 years ago • 1 comments

Describe the bug

In a project, I have a button that suspends and resumes an observer. There are cases, seemingly random, where the observer no longer shows any mesh, except for some artefacts that stay present even when using ClearObservations. Sometimes it triggers after only one or two suspend/resume, sometimes it works near a hundred times before getting buggy.

To reproduce

Toggle script :

private void ToggleSpatialMesh(bool state)
    {
        var observer = CoreServices.GetSpatialAwarenessSystemDataProvider<IMixedRealitySpatialAwarenessMeshObserver>();
        if (state)
        {
            observer.Resume();
            observer.DisplayOption = SpatialAwarenessMeshDisplayOptions.Visible;
            m_holorekaUI.SetIconSprite(0, m_icon1Enabled);
        }
        else
        {
            observer.DisplayOption = SpatialAwarenessMeshDisplayOptions.None;
            observer.Suspend();
            observer.ClearObservations();
            m_holorekaUI.SetIconSprite(0, m_icon1Disabled);
        }
    }

Your setup

  • Unity Version 2021.3.16, also seen with Unity 2020.3.33
  • MRTK Version 2.8

Target platform

  • HoloLens 2

Additional context

It seems similar to #6425 and #6809, but they should have been patched a while ago.

Rakazthas avatar Jan 18 '23 14:01 Rakazthas

After some more testing, the bug seems to be triggering when the mesh is resumed and then suspended quickly, so a timelock between 2 inputs could be a workaround, but I'm still curious as to why it happens, I'll update if I find anything else.

(I also forgot to add a precision, if it is useful : I work with the OpenXRSpatialAwarenessMeshObserver.)

Rakazthas avatar Jan 19 '23 13:01 Rakazthas

Hi @Rakazthas,

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!

IssueSyncBot avatar Jan 13 '24 00:01 IssueSyncBot