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

uGUI

-

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)

  1. 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".

Comments (26)

  1. 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.

  2. 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.

  3. Stream

    Aug 16, 2023 18:21

    Same issue

  4. Corgi_084

    Jul 04, 2023 01:58

    still got this issue with 2022.3.0 LTS

  5. 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:

    https://forum.unity.com/threads/gui-error-you-are-pushing-more-guiclips-than-you-are-popping-and-more.1224966/#post-8685375

    Can't explain why it works tho.

  6. 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".

  7. halbo5

    Oct 26, 2022 17:14

    Same problem in 2021.3.12

  8. Glowing_Slab

    Oct 12, 2022 12:52

    Actually a high level of pain.

  9. breakmt

    Oct 11, 2022 05:26

    Still exists on 2021.3.11
    Why "Won't fix" ??

  10. connygy

    Oct 09, 2022 13:18

    I have also this issue on unity 3031.3.11f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.