Search Issue Tracker
Fixed
Fixed in 2021.3.21f1, 2022.2.21f1, 2023.1.0a22
Votes
1
Found in
2021.3.14f1
2022.1.23f1
2023.1.0a18
Issue ID
UUM-19168
Regression
No
[Forma Render] NullReferenceException in UnityEngine.UIElements.PanelRaycaster.Raycast during runtime
Reproduction steps:
1. Open the “Validation“ project
2. Enter the Play Mode
3. Observe the Console
Expected result: no NullReferenceException
Actual result: a NullReferenceException
Reproduced in: 2021.3.14f1, 2022.1.23f1
Could not test in: 2020.3.42f1, 2022.2.0b14, 2023.1.0a19 (project issues after downgrade/upgrade)
Reproduced using: macOS Monterey 12.0.1 (Intel), Windows 10
Notes:
* The reporter also reproduced in 2023.1
* Sometimes the error does not occur
* Could not test a Player due to UI failing to load in it
Full error:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.PanelRaycaster.Raycast (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] resultAppendList) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/UIElements/PanelRaycaster.cs:108)
UnityEngine.EventSystems.EventSystem.RaycastAll (UnityEngine.EventSystems.PointerEventData eventData, System.Collections.Generic.List`1[T] raycastResults) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:263)
UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData (System.Int32 id) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/PointerInputModule.cs:295)
UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:540)
UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:526)
UnityEngine.EventSystems.StandaloneInputModule.Process () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:280)
UnityEngine.EventSystems.EventSystem.Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)
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
- MeshRenderer.sortingLayerID cannot be changed when change is being done in a built Player
- Warnings related to App Icon are being thrown when building project to VisionOS Platform
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
Resolution Note (fix version 2022.2.21f1):
Fixed in 2022.2.21f1
Resolution Note (fix version 2021.3.21f1):
Fixed in 2021.3.21f1