Reproduction steps:
1. Setup a headless Windows machine
2. Setup the “repro” project
3. Run the Editor with: "C:\Program Files\Unity\Hub\Editor\<version>\Editor\Unity.exe" -batchmode -buildTarget StandaloneWindows64 -quit -projectPath </path/to/repro/project> -executeMethod BuildScript.BuildWindows
Expected results: Project is built
Actual results: Unity Editor crashes
Reproducible with: 2021.3.27f1, 2021.3.34f1, 2022.3.21f1
Not reproducible with: 2021.3.24f1
Reproduced on: Windows 10
Not reproduced on: No other environment tested
First lines of the stack trace from crash.dmp:
Unity.exe!RevealInFinder(struct dynamic_array<class core::basic_string<char,class core::StringStorageDefault<char> >,0> const &) Unknown
Unity.exe!RevealInFinder(class core::basic_string_ref<char>) Unknown
Unity.exe!EditorUtility_CUSTOM_RevealInFinder(class ScriptingBackendNativeStringPtrOpaque *) Unknown
mono-2.0-bdwgc.dll!00007ff977434b6e() Unknown
mono-2.0-bdwgc.dll!00007ff97736d204() Unknown
Notes:
- CQA did not reproduce this issue, as we didn’t set up a headless machine for this bug report
- All the bug information was provided by the bug reporters
- As per the bug reporter, this issue didn’t happen in 2021.3.24f1, so a regression happened somewhere between it and 2021.3.27f1