Reproduction steps:
1. Open the attached project “CrashRepro”
Expected result: The project opens
Actual result: The Editor crashes
Reproducible with: 2021.3.16f1
Not reproducible with: 2022.3.15f1, 2023.2.4f1, 2023.3.0a18
Fixed in: 2021.3.17f1
Reproducible on: macOS 14.1.1 (M1 Max)
Not reproducible on: Windows 10
First few lines of the stack trace:
#0 0x000001810cd11c in __pthread_kill Thread 0x2b10b3000 may have been prematurely finalized
#1 0x1824800181014a40 in abort Thread 0x2b10b3000 may have been prematurely finalized
#2 0x500f800181013d30 in err Thread 0x2b10b3000 may have been prematurely finalized
#3 0x53e00018b39d3fc in bool MTLGetEnvCase<MTLErrorModeType>(char const*, MTLErrorModeType&, std::_1::vector<std::1::pair<char const*, MTLErrorModeType>, std::1::allocator<std::_1::pair<char const*, MTLErrorModeType>>> const&) (.cold.1) Thread 0x2b10b3000 may have been prematurely finalized
#4 0x7c2e80018b37a380 in MTLReportFailure Thread 0x2b10b3000 may have been prematurely finalized
#5 0xc47100018b3702e0 in _MTLMessageContextEnd