Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
2.99k stars 1.11k forks source link

[Bug] Unity crashes when running XR Simulation on Apple Silicon (M1) #994

Closed ajayns closed 1 year ago

ajayns commented 2 years ago

Describe the bug For even the most basic AR setup in Unity, the app almost instantly hangs or does so when you interact with it once when in play mode.

It seems to be a macOS error, particularly even an M1 chipset thing cause I run the same thing on windows and it works fine. Possibly related: https://forum.unity.com/threads/macbook-pro-m1-oculus-crash.1017730/

To Reproduce Steps to reproduce the behavior:

  1. Run any of the example scenes even in this repo
  2. Setup XR Simulation Environments
  3. Enable AR Environments and enter play mode
  4. Interact with the app once or twice and wait for it to hang.

Expected behavior Runs simulation smoothly.

Actual behavior Unity Crashed

Smartphone (please complete the following information):

andyb-unity commented 2 years ago

Please file a bug. https://unity3d.com/unity/qa/bug-reporting

DennisDeRykeUnity commented 2 years ago

@ajayns Thank you for bringing this to our attention! Unity QA staff encountered this issue this week, and one of our AR Devs was able to reproduce this bug. We do not see the crash if we use the Intel version of the Unity Editor on an M1 Mac. We are continuing to investigate.

JanOwiesniak commented 1 year ago

I experience the same problem on my MacBook Pro (16" M1 Max). All AR Foundation scenes freeze as soon as I press the "Run" button in the Unity Editor Silicon Edition.

Workaround

Install Unity Editor Intel Edition and ran it with Rosetta

KyryloKuzyk commented 1 year ago

Several AR Foundation Remote plugin users also experience crashes on the M1 chip with similar symptoms.

ankur-unity commented 1 year ago

We have created a public issue tracker for this bug: https://issuetracker.unity3d.com/issues/simulation-hangs-on-arm-macs-with-silicon-editor-build

andyb-unity commented 1 year ago

Fixed in AR Foundation 5.0.2: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.0/changelog/CHANGELOG.html

ajayns commented 1 year ago

Verified fix! Thanks a bunch guys!