Mixedrealitytoolkit-unity: "SerializedObjectNotCreatableException: Object at index 0 is null exceptions" when configuring scene for Hololens 1

Created on 2 Oct 2020  路  21Comments  路  Source: microsoft/MixedRealityToolkit-Unity

Describe the bug

Configuring the MixedReality Toolkit with cloned default Hololens 1 profile produces 48 exceptions on start each are:
"SerializedObjectNotCreatableException: Object at index 0 is null exceptions"
from various parts of MRTK.

After build the scene is not working as intended: the whole scene is fixed in front of the user and follows the user when turning around.

To reproduce

  1. Create new unity projcet
  2. Add MRT through UPM
  3. Add new Scene
  4. Add mrtk to scene
  5. On the MixedRealityToolkit asset select the DefaultMixedRealityToolkitConfigurationProfile

The same bug is present when using the Hololens1 profile, cloning it, and fixing the broken default profiles with no luck. The same is also true for hololens 2

Expected behavior

Default Hololens 1 profile should work out of the box for hololens 1

Screenshots

image

Your setup (please complete the following information)

  • Unity Version 2020.1.6
  • MRTK Version 2.5.0

Target platform (please complete the following information)

  • HoloLens 1
  • HoloLens 2

Additional context

profiles.zip The configuration I tried to use.
Using 2.4.0 the default Hololens 1/2 settings worked as expected

Bug Documentation XR SDK

All 21 comments

Can you click on any of those messages in the console and post the resulting call stack please?

Thanks for filing this. We are investigating.

Ok, so I cloned the repo on another computer, and it seems to work just fine. I can check on my other machine which produced the errors on Monday. Maybe it was just some weird caching error in Unity?
Edit: I tried the build on a hololens 1 emulator, and it produces the same error. I get this output from the build within the emulator https://pastebin.com/p76DgBuB

I have tried it again on my work computer, and could not reproduce the errors in the editor, although, the camera issue is still present when running on the HoloLens 1.

Maybe it was just some weird caching error in Unity?

Sometimes, I find it helpful to delete the Library folder and let Unity recreate it. It pulls fresh copies of the packages too.

This one is up next on my backlog. Hope to have an idea of what you are seeing soon.

@KuraiAndras, I wanted to give an update on where I am investigating this (my apologies for the delay, i got prempted). Based on your original screen shot, I tried running using the Default HoloLens 1 profile in the editor using the following configuration:

  • Unity 2019.4.12f1
  • MRTK Foundation package (2.5.0) via UPM
  • Windows Mixed Reality package (4.2.3) via UPM
  • Enable Virtual Reality in Player settings
  • DefaultHoloLens1ConfigurationProfile

I did not receive any errors re: broken profiles (I would be very interested to learn what you are seeing here). Also, i had no errors in the console.

My next step will be to deploy to a HoloLens 1 and confirm i see no debug messages and that i can walk around the cube (rather than the image being statically locked).

image

@davidkline-ms
This is what I see when I select the DefaultHoloLens1ConfigurationProfile:

image

Starting the application with the default profile:

image

Version stuff:

  • Unity 2020.1.8
  • MRTK 2.5.0 via UPM
  • Windows XR Plugin via UPM 3.3.1 (I can't seem to find the Windows Mixed Reality package your mentioned?)
  • Enabled Virtual reality in player settings

Ahhh. thank you for the corrections. I will test again!

(I can't seem to find the Windows Mixed Reality package your mentioned?)

That package was deprecated in Unity 2019 and removed in 2020.1

Sorry, i did not want to close the issue, I pressed the wrong button

I JUST realized.... Our default profiles are designed for Unity 2018.4 users (and 2019.4 when using the legacy XR pipeline).

2020.1 no longer supports that and the XRSDK profiles are required.... Let me confirm which we have and ensure we have a full set.

@KuraiAndras, can you try using the DefaultXRSDKConfigurationProfile? The diagnostics system will not launch by default (I modified the profile on my project and will enable it in my PR).

image

the warning i have is that i did not set my rendering to single pass instanced and is not related to what you are seeing

In the editor I no longer get warnings or errors, I'll try a build with the HoloLens emulator.

@KuraiAndras Here's some additional information about MRTK on 2020 with the new XR pipeline: https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/GettingStartedWithMRTKAndXRSDK.html

I will definitely create HoloLens 1 and HoloLens 2 versions of the XRSDK default profile, thought the umbrella one should work (just has more features enabled by default)

@keveleigh Here the documentation seems to have screenshots from older versions, the current settings are named slightly differently (eg: its now not Microsoft.MixedReality.Toolkit.WindowsMixedReality but Microsoft.MixedReality.Toolkit.XRSDK.WindowsMixedReallity)
Edit: scratch this, the pictures are right. Confused the pictures, i'm just tired

@davidkline-ms I tried the build in the hololens 1 emulator and it works! Thank you.
What will be the resolution of this? Will you provide a different default setting in 2.5.1?

I will provide mirrors of the DefaultHoloLens*ConfigurationProfile assets for XRSDK as a convenience.

Glad it is working for you!

On second thought, we are going to update our documentation with additional HoloLens guidance for XRSDK based projects.

Was this page helpful?
0 / 5 - 0 ratings