Apple Silicon 2021.2.0b9 + macOS 12b6 | Shader compiler crashes when opening any project

I’ve been using the Apple Silicon preview editor on Monterey since it released with relatively few issues. But today I can’t open any projects, even fresh, empty built-in render pipeline projects with the AS preview editor. The 2020 LTS editor seems to be fine.

As I was writing this, I downloaded the Intel version of 2021.2.0b9 and verified that it launches successfully.

Please submit a bug report - we’ll investigate.

Submitted: Case 1361979

1 Like

For anyone affected by this that doesn’t want to use the full Intel version of the editor, as a workaround you can replace some of the arm64 executables and libraries in the Apple Silicon editor package /Contents/Tools/ with their equivalent versions from an Intel install, and just letting those specific tools that aren’t working in beta 6 run under Rosetta instead of the entire editor. Replacing the following four files got it to work for me:

-UnityShaderCompiler
-D3Dcompiler_47.dll
-gslang.dylib
-libdxcompiler.dylib

There might be a few things that aren’t working that I haven’t run into yet, but this is enough to get my project open and running and building.

1 Like

Thanks for the workaround! It works!

Verified that this issue still persists in beta 10.

Verified that this issue still persists in beta 11.

With the above workaround, anyone else getting random crashes? I get it when dealing with heavy inspector changes (particles), as well as when exiting play mode at times. Unity just hangs up and I have to force quit it to get going again.

I just finished implementing the fix today. Hoping to get it in soon.

2 Likes

Amazing news! Excited to check it out, appreciate the effort that’s been going into as small a market as M1 Macs may be right now.

Is the issue related so some changed VM handling in beta 6? JetBrains IDEs broke with this beta too, but they haven’t addressed or fixed it yet.

Nah, we were accidentally using the x18 register in our assembly code which is apparently reserved on Apple silicon (and Monterey started using it for its own purposes).

Fascinating, I’d love to know how you tracked that down, sounds like a tricky bug!

Figuring out how to fix it was harder than figuring out what was going on :). Attaching a debugger was enough for it to tell me that we were crashing when trying to use the value read from that register.

It also seems like this issue is gone with macOS 12 beta 7

Looks like we weren’t the only ones fixing stuff then :).

1 Like