Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.0f1
2017.4.11f1
2018.3.0a1
2019.1.0a1
2019.2.0a1
Issue ID
1131564
Regression
No
Visual Studio debugger reports variables with same name in Coroutine as null
How to reproduce:
1. Open the attached project ("case_1131564-VisualStudioDebuggerIncorrectNull.zip")
2. Open the "TestScript" and start debugging it
3. Set a breakpoint in TestIEnumerator() and check the values of variables "g" and "mc"
Expected result: "g" correctly shows its value as Game Object "first node" and "mc" shows its value as "MeshCollider"
Actual result: "g" and "mc" values are returned as null
Reproduced in: 2019.2.0a6, 2019.1.0b5, 2018.3.7f1, 2017.4.22f1
Note: only reproduces if there's a "yield return null" statement in the 2nd block-scope and the two variables in different scopes have the same name
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Modifying UI Prefab child's Height only confirms the first 1 or 2 digits when the Scene is newly opened or the Prefab is newly created
- ProfilingSampler.Get() returns null and makes the Player only render black when building a Release Build
- Search text field visual controls for the Path binding in an Input Actions Asset is misaligned
- Display issues in VideoPlayer when using Screen.SetResolution on certain Google Pixel devices
- Crash on Texture::TextureIDMapInsert when opening a specific project
Resolution Note:
This is only an issue when using the old scripting runtime, likely due to a bug in the Mono C# compiler. The legacy scripting runtime has been deprecated at 2018.3 and is being removed for 2019.2. Please use the new scripting runtime which uses the Roslyn C# compiler to avoid this issue.