Search Issue Tracker
Won't Fix
Votes
2
Found in
2021.2.0b13
2021.2.13f1
Issue ID
1407707
Regression
Yes
GUI and NullReferenceException errors are thrown when entering Play mode
How to reproduce:
1. Open the user-submitted project
2. Open the scene "SampleScene" (Assets/Scenes/SampleScene.unity)
3. In the Hierarchy window, select the GameObject "Canvas" and enter Play mode
4. While Play mode is loading, start clicking the left mouse button inside the Scene view
5. When Play mode has loaded, inspect the Console window (Window > General > Console)
Expected result: No errors are seen
Actual result: GUI and NullReferenceException errors are seen
Reproducible with: 2021.2.0b13, 2021.2.15f1
Not reproducible with: 2019.4.36f1, 2020.3.31f1, 2021.2.0b12, 2022.1.0a1, 2022.1.0b11, 2022.2.0a7
Note: Might take a few tries to reproduce. Retry from step 3 if the errors didn't appear.
Errors:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.SceneView.CallOnPreSceneGUI () (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:3659)
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
-
Prosto_Lyubo
Jul 19, 2024 02:08
"low user pain "
Lol, this is one of the biggest pains I currently have with Unity. I experience those errors almost constantly. It is really annoying that every time I enter playmode I need to thoroughly check the console to see if I actually have an error or is it just another round of "ah, Unity made a lousy job of catching their own errors and they are just spamming my console for the sole purpose of annoying me and wasting my time".
Please fix or at least put a trycatch on that to not log internal errors that users can't do anything about. -
Geomecraft
Jan 09, 2024 00:15
Being seen this again recently whenever a GameObject with Trailrender component is selected before clicking "play" in the editor.
-
Stream
Aug 16, 2023 18:21
Same issue
-
Corgi_084
Jul 04, 2023 01:58
still got this issue with 2022.3.0 LTS
-
fdolbec123
Mar 06, 2023 07:08
I'm very late to this post, be this might help to fix it... (Or at least, it seems to do the trick for me...)
As stated on this thread, making sure that no GameObject is selected before running your game seems to prevent these errors to show up:
Can't explain why it works tho.
-
conjugategames
Dec 24, 2022 19:15
reproducable on 2021.3.8f1
What is the LTS version for which this is fixed?
| RESOLUTION NOTE (2021.3.X):
| This does not reproduce on the current editor version, and given how inconsistent and low user
|pain this problem is I am closing with "wont fix". -
halbo5
Oct 26, 2022 17:14
Same problem in 2021.3.12
-
Glowing_Slab
Oct 12, 2022 12:52
Actually a high level of pain.
-
breakmt
Oct 11, 2022 05:26
Still exists on 2021.3.11
Why "Won't fix" ?? -
connygy
Oct 09, 2022 13:18
I have also this issue on unity 3031.3.11f1
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2021.3.X):
This does not reproduce on the current editor version, and given how inconsistent and low user pain this problem is I am closing with "wont fix".