Search Issue Tracker

Fixed in 2022.1.X

Fixed in 2020.3.X, 2021.1.X, 2021.2.X



Found in







Issue ID




Editor crashes when inspecting Serialized Field ParticleSystem variable in Visual Studio Code Debugger that is not assigned

Visual Effects - Legacy


How to reproduce:
1. Open the attached project ""
2. Open "TestScene" Scene
3. Open "TestPS.cs" script in Visual Studio Code
4. Inside the script, add a breakpoint to line 18
5. Add "_testPS1", "PSClass1", "_testPS2", "PSClass2" variables to Watch list in Visual Studio Code
6. Start Debugging in Visual Studio Code
7. Enter Play Mode in the Editor
8. Inspect the "_testPS2" variable in the Visual Studio Code Watch list

Expected result: inspecting variable in Visual Studio Code works
Actual result: Editor crashes

Reproducible with: 2019.4.29f1, 2020.3.15f2, 2021.1.16f1, 2021.2.0b6, 2022.1.0a5

Start of stack trace:
0x000000013fa1989f (Unity) ParticleSystem_CollisionModule_CUSTOM_get_planeCount_Injected
0x000000006b07d8fe (Mono JIT Code) (wrapper managed-to-native) UnityEngine.ParticleSystem/CollisionModule:get_planeCount_Injected (UnityEngine.ParticleSystem/CollisionModule&)
0x000000006b07d7b3 (Mono JIT Code) UnityEngine.ParticleSystem/CollisionModule:get_planeCount ()
0x000000006b07d68b (Mono JIT Code) UnityEngine.ParticleSystem/CollisionModule:get_maxPlaneCount ()
0x000000006b07ced8 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_int__this__ (intptr&,intptr,intptr,intptr)
0x000007fed659e650 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke
0x000007fed6522ae2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
0x000007fed669a2fd (mono-2.0-bdwgc) [debugger-agent.c:8643] do_invoke_method
0x000007fed669de8e (mono-2.0-bdwgc) [debugger-agent.c:8781] invoke_method
0x000007fed66a786e (mono-2.0-bdwgc) [debugger-agent.c:3313] suspend_current
0x000007fed66a2f45 (mono-2.0-bdwgc) [debugger-agent.c:4259] process_event
0x000007fed66a2476 (mono-2.0-bdwgc) [debugger-agent.c:5805] process_breakpoint
0x000007fed6697ba1 (mono-2.0-bdwgc) [debugger-agent.c:6238] debugger_agent_breakpoint_from_context
0x0000000002f2008d ((<unknown>))
0x000000006b06176f (Mono JIT Code) [TestPS.cs:18] TestPS:Awake ()
0x000000006f5a4168 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x000007fed659e650 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke
0x000007fed6522ae2 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
0x000007fed652bb3f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
0x0000000140c8d874 (Unity) scripting_method_invoke
0x0000000140c861c5 (Unity) ScriptingInvocation::Invoke
0x0000000140c865ee (Unity) ScriptingInvocation::InvokeChecked
0x0000000140cf3246 (Unity) SerializableManagedRef::CallMethod
0x0000000140c33494 (Unity) MonoBehaviour::CallAwake
0x0000000140c31ce5 (Unity) MonoBehaviour::AddToManager
0x0000000140c32711 (Unity) MonoBehaviour::AwakeFromLoad

  1. Resolution Note (fix version 2022.1):

    Fixed in: 2022.1.0a9

  2. Resolution Note (fix version 2021.2):

    Fixed in: 2021.2.0b15

  3. Resolution Note (fix version 2021.1):

    Fixed in: 2021.1.25f1

  4. Resolution Note (fix version 2020.3):

    Fixed in: 2020.3.22f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.