Reproduction steps:
1. Open the attached “repro-project“
2. Select “Ignore“ in the “Enter Safe Mode?“ pop-up
3. In the Project window navigate to the ”Assets/UdonDoor” folder
4. Select the “DoorController.prefab“ Prefab
5. Observe the crash
Reproducible with: 2022.2.0b10, 2022.3.21f1, 2023.2.13f1, 2023.3.0b10
Not reproducible with: 2021.3.36f1, 2022.2.0a14
Could not test with: 2022.2.0a15, 2022.2.0b9 (due to the Editor crashing when loading the project caused by another issue)
Reproduced on: Windows 10, Windows 11 (by reporter)
Not reproducible on: No other environment tested
Note: Could not find the exact regression point due to the Editor crashing when loading the project
First few lines of the stack trace:
0x00007ff736b7d469 (Unity) Undo_CUSTOM_AddComponent
0x0000023d9d37852c (Mono JIT Code) (wrapper managed-to-native) UnityEditor.Undo:AddComponent (UnityEngine.GameObject,System.Type)
0x0000023d9d376393 (Mono JIT Code) UdonSharpEditor.UdonSharpBehaviourEditor:OnEnable () (at ./Packages/com.vrchat.worlds/Integrations/UdonSharp/Editor/Editors/UdonSharpBehaviourEditor.cs:188)
0x0000023d7fb37478 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void_this_ (object,intptr,intptr,intptr)
0x00007ffd574be0d4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)