Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceExpection in BaseSpatialObserver.CleanupMeshObject on Hololens #3226

Closed
wassx opened this issue Dec 5, 2018 · 2 comments
Closed
Assignees

Comments

@wassx
Copy link
Contributor

wassx commented Dec 5, 2018

Does this affect the legacy HoloToolkit (master) or the Mixed Reality Toolkit (mrtk_release)?
Mixed Reality Toolkit

Describe the bug
We added the spatial awareness system to visualize the room mesh. It works as expected on the hololens, but in the log I receive lots of NullReferenceExceptions in a very short timespan (see screenshot).

image

To Reproduce
The setup of the configuration profile looks like this:
image

So it is initially active and will be set programatically to hidden by using following code, but as far as I found out this switch is not relevant as the error occurs on the InvokeSurfaceDataReadyEvent (see stacktrace):

private void SetSpatialMeshPulseVisible(bool visible) {
    bool isOpaque = MixedRealityToolkit.Instance.ActiveProfile.CameraProfile.IsOpaque;
    SpatialMeshDisplayOptions displayOptions = visible && !isOpaque ? SpatialMeshDisplayOptions.Visible : SpatialMeshDisplayOptions.None;
    MixedRealityToolkit.Instance.GetService<IMixedRealitySpatialAwarenessSystem>().MeshDisplayOption =
            displayOptions;
}

Unity Editor Version
2018.2.17f1

Mixed Reality Toolkit Release Version
mrtk_development 49f5c4c

@StephenHodgson
Copy link
Contributor

Thanks for the report

@david-c-kline
Copy link

this should be addressed in #3399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants