Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Weird crash on Unity 5.5.3F1, UWP SDK 14393, HoloLens Windows 10.0.14393.1083

Hello, guys. Long time no ask.

I have finally obtained my own HoloLens and am experiencing a very weird crash deep in the Unity code. I do not use HoloToolkit for this demo, only plain and simple SpatialMappingCollider component. The scene is basically a camera, a very simple cursor and a SpatialMappingCollider (no renderer). The cursor on Update raycasts to spatial mapping and positions itself there.

Spatial mapping:

It works perfectly, but then, once in say 3 seconds, it simply throws the following exception:

Exception thrown: 'System.NullReferenceException' in UnityEngine.HoloLens.dll
NullReferenceException: Object reference not set to an instance of an object.
   at UnityEngine.VR.WSA.SpatialMappingBase.ShouldRemainActiveWhileBeingRemoved(Surface surface)
   at UnityEngine.VR.WSA.SpatialMappingBase.OnRemoveSurface(SurfaceId surfaceId)
   at UnityEngine.VR.WSA.SpatialMappingBase.OnSurfaceChanged(SurfaceId surfaceId, SurfaceChange changeType, Bounds bounds, DateTime updateTime)
   at UnityEngine.VR.WSA.SurfaceObserver.InvokeSurfaceChangedEvent(SurfaceChangedDelegate onSurfaceChanged, Int32 surfaceId, SurfaceChange changeType, Bounds bounds, Int64 updateTime)
   at UnityEngine.VR.WSA.SurfaceObserver.$Invoke10(Int64 instance, Int64* args)
   at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method) 
(Filename: <Unknown> Line: 0)

I have:

  • Windows 10 Pro
  • Unity 5.5.3F1 (Build settings: Universal 10, HoloLens, D3D, 10.0.14393.0, Local Machine, Spatial Perception and Mic capabilities enabled)
  • HoloLens Windows 10.0.14393.1083 (latest update)

Has anybody dealt with this nasty exceptions before?

Thank you for any hints!

Building the future of holographic navigation. We're hiring.

Best Answer

  • Options
    stepan_stulovstepan_stulov ✭✭✭
    Answer ✓

    For anybody experiencing the same crash. The solution is to make sure the camera has "MainCamera" tag.

    Building the future of holographic navigation. We're hiring.

Answers

  • Options
    stepan_stulovstepan_stulov ✭✭✭
    Answer ✓

    For anybody experiencing the same crash. The solution is to make sure the camera has "MainCamera" tag.

    Building the future of holographic navigation. We're hiring.

  • Options

    Thanks! Your solution is very helpful! Although I am still confused about what this error does, because I don't see any difference in terms of performance/results.

Sign In or Register to comment.