Search Issue Tracker

Fixed in Unity 2018.1

Votes

0

Found in

2018.1.0a5

Issue ID

971238

Regression

Yes

[Editor Window] Null reference exception is shown when interacting with Unity Engine Editor API while using Gaia Manager

IMGUI

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 3Secondary functionality broken

Steps to Repo:
1. Import Gaia editor extension from asset store or open [use-case] Terrain - Procedural Terrain project
2. Go to window > Gaia > Show Gaia Manager
3. Gaia Manager > Standard > Create Terrain & Show Stamper
4. Gaia Manager > Advanced > Show Session Manager
5. Inspector > Gaia Session Manager Script > Enable Random Terrain Generator > Click Play Session
6. Click Reset Session > Pop-up > Select "No"
7. Click Play Session > Pop-up > Select "No"
8. Observe errors in console

Actual Result:
Null reference exception is shown on console window

Expected Result:
Null error expectations are not received

Environment:
Unity 2018.1.0a5
Mac

Reproducible with:
Unity 2018.1.0a5, Unity 2018.1.0a4, Unity 2018.1.0a2 , Unity 2017.3.0b9, Unity 2017.3.0b3

Not reproducible with:
Unity 2017.2.0f3
License type: Free

Frequency: Always

Note: Working on windows.

Stack Trace:
Error:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayout.Space (Single pixels) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:271)
Gaia.GaiaSessionManagerEditor.OnInspectorGUI () (at Assets/Gaia/Scripts/Editor/GaiaSessionManagerEditor.cs:433)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1297)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error:
EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:317)
UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7827)
UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7807)
UnityEditor.InspectorWindow.AddComponentButton (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1453)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:440)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at /Users/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:255)

Error:
EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEditor.EditorGUILayout:EndToggleGroup()
Gaia.GaiaSessionManagerEditor:OnInspectorGUI() (at Assets/Gaia/Scripts/Editor/GaiaSessionManagerEditor.cs:345)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error:
EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical()
Gaia.GaiaSessionManagerEditor:OnInspectorGUI() (at Assets/Gaia/Scripts/Editor/GaiaSessionManagerEditor.cs:346)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:317)
UnityEngine.GUILayout.BeginVertical (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:333)
UnityEngine.GUILayout.BeginVertical (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:323)
Gaia.GaiaSessionManagerEditor.OnInspectorGUI () (at Assets/Gaia/Scripts/Editor/GaiaSessionManagerEditor.cs:350)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1297)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

All about bugs

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