Search Issue Tracker
Fixed
Fixed in 2022.2.10f1, 2023.1.0b1
Votes
11
Found in
2022.2.0b11
2023.1.0a14
Issue ID
UUM-17551
Regression
Yes
Editor with two locked Project tabs opened throws NullReferenceException in the Console when selecting an error in the Console window
Reproduction steps:
# Open the user attached project
# Open the “SampleScene” scene
# Enter the Play mode
# Select the error in the Console window
Expected result: NullReferenceException is not thrown in the Console
Actual result: NullReferenceException is thrown in the Console
Reproducible with: 2022.1.0b1, 2022.1.20f1, 2022.2.0b11, 2023.1.0a14
Not reproducible with: 2020.3.40f1, 2021.3.12f1, 2022.1.0a16
Reproduced on: Windows 10
Note: in 2022.2 and 2023.1 sometimes, the Console window will bug out and won’t show anything unless opened again, behavior is intermittent, no clear workaround for this
First few lines of error:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ProjectBrowser.FrameObject (System.Int32 instanceID, System.Boolean ping) (at <bea9da6418424583b59c6d5cd71cb31c>:0)
UnityEditor.EditorGUIUtility.PingObject (System.Int32 targetInstanceID) (at <bea9da6418424583b59c6d5cd71cb31c>:0)
UnityEditor.ConsoleWindow.SetActiveEntry (UnityEditor.LogEntry entry) (at <bea9da6418424583b59c6d5cd71cb31c>:0)
UnityEditor.ConsoleWindow.OnGUI () (at <bea9da6418424583b59c6d5cd71cb31c>:0)
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
- Crash on EditorApplication:Internal_CallUpdateFunctions when pushing property block by index to SpriteShapeRenderer
- Depth Texture Mode "After Opaques" breaks when "Full Screen Pass Renderer Feature" is added
- The Code Previews panel is initially opened in a slightly minimized state
- Dropdown search icon is used next to the UI Builders Library search when the search has no dropdown functionality
- UI Builders library selection buttons tooltips are not in accordance with the Editors foundations
montr3uil
Feb 12, 2023 21:01
Thank you for reporting this, I too have found this issue. It would seem that I needed to enter playmode atleast once before the error showed up on a fresh boot
TheVirtualMunk
Nov 29, 2022 14:57
Same issue and error thrown when logging a component as context
ryan-at-melcher
Nov 01, 2022 18:20
Thanks for posting this! I was having the same error: 4 project views, 2 were locked, and unlocking one fixed it. My issue started happening when I called EditorGUIUtility.PingObject. Then it would throw a similar error whenever I clicked on something and changed my selection. Here is the callstack of that initial PingObject call (wish I could pastebin this):
NullReferenceException: Object reference not set to an instance of an object
at UnityEditor.ProjectBrowser.FrameObject (System.Int32 instanceID, System.Boolean ping) [0x00094] in <ee6fd03ff96245f993c3cba83ed9657b>:0
at UnityEditor.EditorGUIUtility.PingObject (System.Int32 targetInstanceID) [0x00053] in <ee6fd03ff96245f993c3cba83ed9657b>:0
at UnityEditor.EditorGUIUtility.PingObject (UnityEngine.Object obj) [0x00012] in <ee6fd03ff96245f993c3cba83ed9657b>:0
at <project_function_name> (UnityEngine.UIElements.FocusEvent focusEvent) [0x00021] in <project_script_path>:698
at UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.PropagationPhase propagationPhase) [0x00046] in <cce578fc5f344bd79194d0850d7f4c47>:0
at UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.PropagationPhase propagationPhase) [0x00098] in <cce578fc5f344bd79194d0850d7f4c47>:0
at UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) [0x000a6] in <cce578fc5f344bd79194d0850d7f4c47>:0
huulong
Oct 27, 2022 13:20
After unlocking one of the Project tabs, the error seems to persist, and I still cannot correctly ping the asset I clicked on.