How to reproduce:
1. Create a new Unity project
2. Install the "Code Coverage" package
3. Go to Window -> Analysis -> Code Coverage
4. Enable the Code Coverage with the Debug Mode off
5. Enable the Debug Mode
6. Disable the Debug Mode and observe the results
Expected results: Editor doesn't crash
Actual results: Editor crashes
Reproducible with: 1.3.0, 2.0.0-pre.1 (2022.3.74f1, 6000.4.1f1, 6000.5.0b1, 6000.6.0a1)
Reproducible on: macOS Tahoe 26 (M1)
Not reproducible on: No other environment tested
Notes:
- Sometimes also reproduced by switching Code Coverage support on and off while Debug Mode is off
- Repeat steps 4-6 if it doesn't crash
First lines of stacktrace:
#0 0x0000017234ea1c in mono_jit_runtime_invoke
#1 0x000001724d4b64 in do_runtime_invoke
#2 0x000001724d4aa4 in mono_runtime_invoke
#3 0x00000105e12b58 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)