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
6k stars 2.12k forks source link

MRKT3 pre.16 crashes in Unity 2021.3.21f1 #11604

Closed LocalJoost closed 1 year ago

LocalJoost commented 1 year ago

This issue has been migrated a new MRTK repository, and the status of this issue will now be tracked at the following location:


Describe the bug

MRKT3 pre.16 crashes in Unity 2021.3.21f1

To reproduce

Steps to reproduce the behavior:

  1. Get repo https://github.com/LocalJoost/CrashRepro
  2. Open in Unity 2021.3.21f1
  3. Build C++ solution for UWP
  4. Open in VS2022 (17.5.3)
  5. Deploy to HoloLens (Master/ARM64) using Visual Studio
  6. Start app on HoloLens
  7. App shows rotating orbs, then crashes
  8. Downgrade project to Unity 2021.3.16f1
  9. Repeat steps 3-56
  10. App runs normally

Expected behavior

App should not hang even when built with 2021.3.21f1

Target platform (please complete the following information)

Additional context

Add any other context about the problem here.

marlenaklein-msft commented 1 year ago

The HL crash may be due to a bug in the Unity input system package. Does the project use an InputSystem version <1.5.1? (I can't see any code in the linked repo).

LocalJoost commented 1 year ago

That is correct, because there IS no code. It's only a scene with a cube. Assuming you mean com.unity.inputsystem, it says 1.4.4

AMollis commented 1 year ago

@LocalJoost the repo only has a LICENSE file. At least that's all I'm seeing

LocalJoost commented 1 year ago

My bad. I use TortoiseGit, and it remembers the last setting. In the previous repo I worked on I committed, but did not push. I did not check before committing the CrashRepo. So I committed - but did not push. This has been fixed. There should be code in it now

Going to hide under a rock now ;)

shaynie commented 1 year ago

Hi @LocalJoost, I believe the crash you are seeing is the StackOverflow crash during device initialization that was fixed in the com.unity.inputsystem 1.5.1 package. Could you please try upgrading the input system to 1.5.1 or greater? Thanks!

AMollis commented 1 year ago

@LocalJoost , @shaynie is correct, this is a stack overflow introduced in Unity 1.5.0 input package. Unity automatically upgrades to 1.5.0 in 2021.3.21.

Here's the MRTK bug that was tracking this issue

@shaynie / @marlenaklein-msft, should we update MRTK3's min version of com.unity.inputsystem 1.5.1 to avoid this problem in the future?

marlenaklein-msft commented 1 year ago

I think this is a good idea

AMollis commented 1 year ago

@LocalJoost I'll repurpose your issue to upgrade MRTK's min input system version.

AMollis commented 1 year ago

Upgraded our min version to 1.5.1 to avoid people hitting this in the future

hummlj commented 1 year ago

Hi, I'm experiencing the same issue with MRTK3 pre. 16, Unity 2021.3.27f1 LTS, Unity Input System 1.6.1, VS2019(16.11.26), Release ARM64, and the well known "3D Object > Cube" setup check... But works with VS2022(17.6.3)