A* Pathfinding Project

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced


#1

Hi There So I have this issue and can’t seem to work out how to fix it!

I’m using Astar Pathfinder Pro 4.1
and Unity3D 2019.3.0a2

I’m following the Tutorial video https://www.youtube.com/watch?v=5QT5Czfe0YE

I’m getting This Error and cant move forward…
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.

Desktop%20screenshot


Version 3 Not working with Unity 2019.1
#2

I was able to reproduce this issue with 4.1.0 beta ( pro )

I was able to fix it by changing the following lines of code;
In EditorGUIx.cs L103

public void Header (string label, ref bool open) {
	/*if (GUILayout.Button(label, labelStyle)) {
		open = !open;
		editor.Repaint();
	}*/
	this.open = true;
}

After having unity compile the changes I reverted the changes and all seemed to work again.

I do recommend updating to the latest version 4.2.8


#3

Hi

I cannot replicate it still, so I’m not sure what’s causing it.

@ToastyStoemp Can you reliably cause the error again if you uncomment that code again?

@Dead-Rose Do you think you could post the full stack trace for the error message?


#4

I tried going over this step by step again, only to end up with a different outcome, nonetheless here are the steps I took:

Unity version 2019.3.0b4
A*PP version 4.1.0 beta (pro)

Create new project
Import the unity package
Open exampleScene Recast Example 1
Select the A* object Pathfinder

image

As you can see here the inspector becomes unusable.

It does yield in a different error ( warning )
UnityEditor.EditorGUILayout:EndFadeGroup()
Pathfinding.FadeArea:End() (at Assets/AstarPathfindingProject/Editor/EditorGUIx.cs:135)
Pathfinding.AstarPathEditor:DrawGraph(GraphEditor) (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:714)
Pathfinding.AstarPathEditor:DrawMainArea() (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:395)
Pathfinding.AstarPathEditor:OnInspectorGUI() (at Assets/AstarPathfindingProject/Editor/AstarPathEditor.cs:277)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This I was able to resolve by changing the next function:

**From:**
public void End () {
		EditorGUILayout.EndVertical();
		if (visible) {
			// Some space that cannot be placed in the GUIStyle unfortunately
			GUILayout.Space(4);
			EditorGUILayout.EndFadeGroup();
		}
		EditorGUILayout.EndVertical();
		GUIUtilityx.PopTint();
	}
**To:**
public void End () {
	EditorGUILayout.EndVertical();
	if (true) {
		// Some space that cannot be placed in the GUIStyle unfortunately
		GUILayout.Space(4);
		EditorGUILayout.EndFadeGroup();
		}
		EditorGUILayout.EndVertical();
		GUIUtilityx.PopTint();
	}

I tried the exact same using 4.2.8 and did NOT have this issue.
The example scene ran fine after re linking the forward animation on the mine_bot.
Also able to Unity version 2019.1.14f1 with A* 4.2.8 worked flawless.

So @Dead-Rose I’d highly recommend updating to the latest version of A* PP, you can find the latest download here: https://arongranberg.com/astar/download