Reproduction steps:
1. Open the attached project “TestCrash”
2. Open Window > General > Test Runner Window
3. Run All Play Mode tests
Expected result: Tests are run
Actual result: Editor crashes
Reproducible with: 2022.3.7f1, 2023.1.8f1, 2023.2.0b4
Could not test with: 2021.3.29f1 (NullReferenceException: Object reference not set to an instance of an object
UnityEngine.TestTools.TestRunner.PlaymodeTestsController.GetController () (at Library/PackageCache/com.unity.test-framework@1.1.33/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs:64))
Reproducible on: macOS 13.5 (M1 Max), Windows 10
First few lines of the stack trace:
#0 0x000002877aa1ac in mono_method_to_ir
#1 0x0000028778b314 in mini_method_compile
#2 0x0000028778d828 in mono_jit_compile_method_inner
#3 0x00000287791430 in mono_jit_compile_method_with_opt
#4 0x0000028780c1f4 in common_call_trampoline
#5 0x0000028780bcf4 in mono_magic_trampoline