Search Issue Tracker
Won't Fix
Votes
2
Found in
2018.2.0a8
Issue ID
1024441
Regression
No
NullReferenceException after undoing creation of InputField in Play mode while it is focused
Steps to reproduce:
1. Create a new project or new scene in Unity
2. Create UI -> Input Field in Hierarchy
3. Enter Play mode
4. Click on Input Field in Game view to focus it (caret appears)
5. Press Ctrl+Z or Cmd+Z a few times until the created Input Field is removed
Expected results:
No NullReferenceException is thrown
Actual results:
NullReferenceException is thrown
Reproduced on:
2018.2.0a8, 2018.1.0f1, 2017.4.1f1, 2017.2.2p3
Error:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UI.InputField.GenerateCaret (UnityEngine.UI.VertexHelper vbo, Vector2 roundingOffset) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1981)
UnityEngine.UI.InputField.OnFillVBO (UnityEngine.Mesh vbo) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1911)
UnityEngine.UI.InputField.UpdateGeometry () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1872)
UnityEngine.UI.InputField.Rebuild (CanvasUpdate update) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1830)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:149)
UnityEditor.Undo:Internal_CallWillFlushUndoRecord()
Comments (3)
-
a436t4ataf
Sep 04, 2019 10:32
Could this be a side-effect of the bug(s) around VertexHelper not being serialized correctly? e.g. on recompile, VH references often get nuked for no apparent reason.
If so ... the WONTFIX here is particularly unhelpful (fixing the bug would have also prevented/fixed other bugs, instead of ignoring a problem that you knew was in your codebase)
-
mxoconnell
Feb 17, 2019 10:44
same thing on 2017.4.15f1
-
Satscape
Dec 12, 2018 14:50
I think I'm having the same issue, 100s of these while in play mode:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UI.InputField.GenerateCaret (UnityEngine.UI.VertexHelper vbo, Vector2 roundingOffset) (at /home/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:2030)
UnityEngine.UI.InputField.OnFillVBO (UnityEngine.Mesh vbo) (at /home/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1960)
UnityEngine.UI.InputField.UpdateGeometry () (at /home/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1921)
UnityEngine.UI.InputField.Rebuild (CanvasUpdate update) (at /home/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/InputField.cs:1879)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at /home/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:150)
UnityEngine.Canvas:SendWillRenderCanvases()Unity version 2018.2.18f1
Any way to suppress it until fixed, as it's hard to track my own exceptions when the log is full of this.
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
- SVG fails to import when 'stroke-miterlimit' is less than 1
- Test Runner fails to create a script in the active path when selecting a file as the active path
- Shader Graph Swizzle Node Input/Output and Mask Update Incorrectly After Undo
- [URP] Crash on GameObject::QueryComponentByType when baking a Reflection Probe in an unsaved/untitled Scene
- No Icons are used for the Entry and Exit States in the Inspector when selected in an Animator Controller
Resolution Note:
low priority defect, unlikely to be resolved in the near future. Closing for now.