microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6.02k stars 2.12k forks source link

App crashing after relaunching from minimized state after device wake up #11152

Closed kivanovBB closed 10 months ago

kivanovBB commented 2 years ago

Describe the bug

App crashing after relaunching from minimized state after device wake up.

To reproduce

Steps to reproduce the behavior:

  1. Open the Spectar app.
  2. Log in/Demo user.
  3. Load any zone with a large count of elements.
  4. Put device to sleep with physical Power button.
  5. After ~15minutes wake up the device.
  6. Launch the app from minimized state.

Expected behavior

No crashing/exception is expected when re-launching the app from sleep state.

Screenshots

Unavailable.

Your setup (please complete the following information)

Unity 2020.3.35f1 MRTK 2.7.3

Target platform (please complete the following information)

Additional context

{"report_id":"SEP1HoQB5RvyKKxA3HfC","app_build":"","install_mode":"","install_store":"","name":"Spectar.Spectar","version":"3.2.422","build_guid":"19abf1616ec3222439f449e214e89c8d","build_tags":[],"client_report_id":"256cbf2fca9514b448fead12f4261dba","client_ts":1666966737142,"debug_device":false,"cpu":"Snapdragon (TM) 850 @ 2.80 GHz","cpu_count":8,"cpu_freq":2649,"device_info_flags":3271559266,"rooted_or_jailbroken":false,"device_model":"HoloLens 2 (Microsoft Corporation)","device_ram":3864,"screen_size":"1280 x 1080","screen_dpi":0,"refresh_rate":0,"sensor_flags":132,"system_language":"en","device_type":3,"device_vram":1932,"enabled_vr_devices":["WindowsMR"],"gpu_api":2,"gpu_caps":8387519,"gpu_copy_texture_support":31,"gpu_device_id":1161245232,"gpu_vendor_id":1297040209,"gpu_driver":"","gpu_max_cubemap_size":16384,"gpu_max_texture_size":16384,"gfx":"Qualcomm(R) Adreno(TM) 630 GPU","gpu_render_texture_support":511,"gpu_shader_caps":50,"gpu_supported_render_target_count":8,"gpu_texture_format_support":915,"gpu_vendor":"Qualcomm","gpu_version":"Direct3D 11.0 [level 11.1]","installation_id":"","is_editor":false,"is_fullscreen":false,"is_wsar_remote":false,"is_ar_app":false,"localprojectid":"ece3807c3b7a2c74e9a3ab440a785a1b","os_family":2,"os":"Windows 10 (10.0.20348) 64bit","platform":"UWPPlayerARM","platformid":20,"appid":"fa2a1989-9625-4030-8370-b101e6f56eb7","screen_orientation":3,"scripting_backend":"IL2CPP","sessionid":9141938012941853000,"sdk_ver":"2020.3.35f1","vr_device_name":"","vr_device_model":"","logs_supported":true,"user_metadata":[],"log_messages":[{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736816,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736826,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736827,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736828,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736829,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736831,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736833,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736846,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736847,"frame":78040,"type":2},{"message":"[Warning] [] [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null. []","ts":1666966736848,"frame":78040,"type":2}],"ts":1666966736890,"user_agent":"UnityPlayer/2020.3.35f1 (UnityWebRequest/1.0, libcurl/7.80.0-DEV)","project_name":"Spectar","crash_report_hash":"1a1375ebfd460db220dbe69100408fd5","managed_exception":{"type":"NullReferenceException","message":"NullReferenceException: Object reference not set to an instance of an object.","stack_trace":"UnityEngine.Object.set_name (System.String value) (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.XRSDK.GenericXRSDKSpatialMeshObserver.ReclaimMeshObject (Microsoft.MixedReality.Toolkit.SpatialAwareness.SpatialAwarenessMeshObject availableMeshObject) (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.XRSDK.GenericXRSDKSpatialMeshObserver.RemoveMeshObject (System.Int32 id) (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.XRSDK.GenericXRSDKSpatialMeshObserver.ClearObservations () (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.SpatialAwareness.BaseSpatialObserver.Destroy () (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.BaseDataProviderAccessCoreSystem.UnregisterDataProvider[T] (T dataProviderInstance) (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.SpatialAwareness.MixedRealitySpatialAwarenessSystem.Disable () (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.MixedRealityToolkit+<>c.b__75_0 (Microsoft.MixedReality.Toolkit.IMixedRealityService service) (at <00000000000000000000000000000000>:0)\nSystem.Xml.OnRemoveWriter.Invoke (System.Xml.XmlRawWriter writer) (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.MixedRealityToolkit.ExecuteOnAllServicesReverseOrder (System.Action`1[T] execute) (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.MixedRealityToolkit.DisableAllServices () (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.MixedRealityToolkit.OnDisable () (at <00000000000000000000000000000000>:0)\n","native_thread_info":null},"native_crash":null,"counter":1}

keveleigh commented 2 years ago

Ooh, looks like there might be a couple of things at play here:

  1. [Singleton] Instance 'Spectar.View.SceneGraph.Nodes.Button.ThemeFactory' already destroyed. Returning null.
  2. NullReferenceException: Object reference not set to an instance of an object.","stack_trace":"UnityEngine.Object.set_name (System.String value) (at <00000000000000000000000000000000>:0)\nMicrosoft.MixedReality.Toolkit.XRSDK.GenericXRSDKSpatialMeshObserver.ReclaimMeshObject (Microsoft.MixedReality.Toolkit.SpatialAwareness.SpatialAwarenessMeshObject availableMeshObject)

I can definitely look into the second case (as well as generally try to repro!), but the first case looks like non-MRTK code.

IssueSyncBot commented 10 months ago

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!