How to reproduce:
1. Open user-attached project “2022.2 Beta Project”
2. Build the project with the IL2CPP Scripting Backend
3. Observe the Player.log
Expected result: The process name is written in the Player.log
Actual result: Null Exception error message
Reproducible with: 2020.3.40f1, 2021.3.10f1, 2022.1.17f1, 2022.2.0b8, 2023.1.0a10
Reproduced on: Windows 11 Pro
Note: Not reproduced with Mono Scripting Backend and in Editor
Full error message:
ArgumentNullException: Collection cannot be null.
Parameter name: c
at System.Collections.ArrayList.InsertRange (System.Int32 index, System.Collections.ICollection c) [0x00000] in <00000000000000000000000000000000>:0
at System.Diagnostics.Process.get_Modules () [0x00000] in <00000000000000000000000000000000>:0
at System.Diagnostics.Process.get_MainModule () [0x00000] in <00000000000000000000000000000000>:0
at B.Init () [0x00000] in <00000000000000000000000000000000>:0