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

Scripted object (OculusXRSDKDeviceManagerProfile?) has different serialization layout when loading

Open timbrando opened this issue 3 years ago • 15 comments

Hello everyone! I get the following bug after starting my app that I deployed to HoloLens 2.

Description of the bug

After starting my app on HoloLens 2 I get the following output in the Development Console:

A scripted object (probably Microsoft.MixedReality.Toolkit.XRSDK.Oculus.Input.OculusXRSDKDeviceManagerProfile?) has a different serialization layout when loading. (Read 72 bytes but expected 116 bytes) Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

It occurs in my current project I am working at as well as in a blank new one. It's not showing in Unity Play Mode but only on HoloLens 2. Despite this error everything else works as expected.

To reproduce

Steps to reproduce the behavior:

  1. Use Unity version 2019.4.11
  2. Have a HoloLens 2
  3. Follow the steps described at https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/tutorials/mr-learning-base-02?tabs=wsa

Expected behavior

After starting the app the development console should not appear and should not show this error.

My setup

  • Unity Version 2019.4.11f1
  • Legacy XR
  • MRTK Version 2.7.0
  • Mixed Reality Feature Tool 1.0.2104.4 Beta

Target platform

HoloLens 2

I hope you can reproduce and resolve this issue!

timbrando avatar Jun 22 '21 06:06 timbrando

Unfortunately I was not able to reproduce this issue. For what it's worth, I didn't see this on 2019.4.26f1. Can you try updating your Unity version and let us know if you still see this?

2.7.1 also had some updates to various device managers, so it's possible it was fixed in the latest patch: https://docs.microsoft.com/en-us/windows/mixed-reality/mrtk-unity/release-notes/mrtk-27-release-notes?view=mrtkunity-2021-05#notable-bugfixes-and-changes

RogPodge avatar Jun 23 '21 20:06 RogPodge

Hi, I updated my project to Unity version 2019.4.28 (newest) and updated the MRTK to 2.7.2 but I still see this error. I also made a new blank project with this configuration and followed the steps described under the link in my initial post but nothing changed. I will try to fiddle with the OculusXRSDKDeviceManagerProfile to see if this is really the problem... Regards

timbrando avatar Jun 24 '21 11:06 timbrando

Can you post a screenshot of where in the development console you are seeing this? I'm wondering if there's a set of warnings that we're filtering out without knowing

RogPodge avatar Jun 25 '21 00:06 RogPodge

IMG_20210625_081453 It is a bit tedious to get a screenshot because the HoloLens photo capture doesn't include the development console. So I made a photo with my phone through the display. I hope it helps. :)

timbrando avatar Jun 25 '21 07:06 timbrando

Update, I've been able to find the error and will be adopting a fix based on this old PR.

https://github.com/microsoft/MixedRealityToolkit-Unity/pull/8072

This should get fixed in the next version of MRTK!

RogPodge avatar Jun 25 '21 22:06 RogPodge

Super cool! Thanks for the support. :) Keep up the great work!

I don't know if you still need the issue for your todo list so I will leave it to you to close this issue...

timbrando avatar Jun 28 '21 06:06 timbrando

Is there any update in what version this fix will be applied? I also suffer from the same error in my HL2 project with Unity 2020.3 LTS / MRTK 2.7.0-preview5 / Windows Mixed Reality.

andikay avatar Jul 12 '21 16:07 andikay

The original scope of the fix is looking a bit larger than initially forecasted unfortunately :(

Since the bug doesn't functionally affect MRTK during runtime, we've put it lower on our priority queue of issues, though be assured that it's still top of mind for us. It may need to wait until a later MRTK release however.

RogPodge avatar Jul 12 '21 17:07 RogPodge

Thanks for the update. I don't know whether or not it impacts MRTK functionality during runtime, it is an error after all and errors in Unity often lead to something not working as desired.

Do you have any suggestion for a workaround to get rid of this error? Oculus is not really relevant for HL2 development/usage anyway.

andikay avatar Jul 12 '21 17:07 andikay

Manually removing the data provider from the profile should resolve the issue: image

if there's other data providers raising an error as well, removing those should also be a good workaround.

RogPodge avatar Jul 12 '21 18:07 RogPodge

This worked, thanks a lot!

andikay avatar Jul 12 '21 19:07 andikay

Tagging related issues: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/8067

RogPodge avatar Aug 09 '21 22:08 RogPodge

I have defaultHololens2InputSystemProfile in place but still does not solve this issue for me.

spany14 avatar Jan 21 '22 10:01 spany14

You have to remove the XRSDK Oculus Device Manager to remove the error. The bug is mostly harmless, it'll only show up on application start but otherwise not affect performance or the application behavior during runtime.

RogPodge avatar Jan 25 '22 22:01 RogPodge

Hello, I have the same error message developing for HoloLens2, as same as @timbrando it's not showing in Unity Play Mode but only on HoloLens 2.

Unity version 2021.3.4f1 MRTK Version 2.8.0.0 Mixed Reality Feature Tool 1.0.2206.1 Preview

Same as @spany14 I have defaultHololens2InputSystemProfile in place but still does not solve this issue for me.

In my Hierarchy: Directional Light MixedRealityToolkit (DefaultHoloLens2ConfigurationProfile) MixedRealitySceneContent MixedRealityPlaysace Cube (Mesh Renderer, Box Collider, Constraint Manager, Object Manipulator, NearInteractionGrabbable, MRTK_Standard_Blue Material - Shader Mixed Reality Toolkit/Standard)

@RogPodge I can't "Remove Data Provider" for XR SDK Oculus Device Manager because the inspector is locked.

Also, the application doesn't track the position of my hands, I see my hands in front of me, but if I turn 90° my hands are now at my side

MRTK .

RaulWick avatar Jun 30 '22 17:06 RaulWick

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 visit https://www.mixedrealitytoolkit.org.

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

IssueSyncBot avatar Jan 13 '24 01:01 IssueSyncBot