Reproduction steps:
1. Open the attached project “RiderCompilation”
2. Open the Preferences window (Edit > Preferences) and in the External Tools section make sure that “External Script Editor” has Rider selected
3. Open script “Assets/_Assets/Scripts/Balls/Ball.cs”
4. Modify the script by adding or removing some lines
5. Save the script (Ctrl + S)
Expected result: Scripts are compiled
Actual result: Editor crashes
Reproducible with: 2023.1.0a5, 2023.1.6f1, 2023.2.0a16
Not reproducible with: 2021.3.29f1, 2022.3.5f1, 2023.1.0a4
Fixed in: 2023.2.0a17
Reproducible on: Windows 11
Notes:
Reproducible with any script
The crash happens once in 3-5 times on average. However, sometimes it can take more than 10 tries.
Do not focus the Editor when it is compiling. It seems to lower the chance of reproduction significantly
Unable to reproduce with Visual Studio (need to focus the editor to initiate compilation)
Crash sometimes happens when downgrading package versions (similar stacktrace)
First few lines of Stacktrace: