Reproduction steps:
1. Open the user’s attached project
2. Build the project
3. Run the project through the terminal until the exit code is non-zero. Commands for cygwin:
while ./taskmanager-shutdown -logFile - -batchmode; do :; done
Expected result: The project runs repeatedly until stopped
Actual result: The project crashes
Reproducible with: 2021.2.0b8, 2021.2.19f1, 2021.3.6f1, 2022.1.10f1, 2022.2.0b1, 2023.1.0a4
Not reproducible with: 2020.3.37f1, 2021.2.0b7
Reproducible on: Windows 11
Notes:
- sometimes while crashing the bug reporter is thrown, other times terminal stops running the project and a crash dump file is generated in %LOCALAPPDATA%/CrashDumps
- the exception seems to be thrown from GetMonitorAndThrowIfNotLockedByCurrentThread
- not reproducible with Mono