Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException when opening diagnostic window in Unity #567

Open
gambit-monkey opened this issue Nov 5, 2023 · 0 comments
Open

Comments

@gambit-monkey
Copy link

Using VContainer v.1.13.2 in Unity v2022.3.11f1 I am getting a null reference when opening the Diagnostics window, I created a blank project and can recreate the exception. Below are the exceptions I am experiencing

First Shown
UnityEditor.IMGUI.Controls.TreeViewDataSource.ReloadData () (at <9920ff0c944845d7b9f9a61ef1478edc>:0) UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.ReloadData () (at <9920ff0c944845d7b9f9a61ef1478edc>:0) UnityEditor.IMGUI.Controls.TreeViewController.ReloadData () (at <9920ff0c944845d7b9f9a61ef1478edc>:0) UnityEditor.IMGUI.Controls.TreeView.Reload () (at <9920ff0c944845d7b9f9a61ef1478edc>:0) VContainer.Editor.Diagnostics.VContainerDiagnosticsInfoTreeView..ctor (UnityEditor.IMGUI.Controls.TreeViewState state, UnityEditor.IMGUI.Controls.MultiColumnHeader header) (at ./Library/PackageCache/jp.hadashikick.vcontainer@c6f9c51dbc/Editor/Diagnostics/VContainerDiagnosticsTreeView.cs:121) VContainer.Editor.Diagnostics.VContainerDiagnosticsInfoTreeView..ctor () (at ./Library/PackageCache/jp.hadashikick.vcontainer@c6f9c51dbc/Editor/Diagnostics/VContainerDiagnosticsTreeView.cs:108) VContainer.Editor.Diagnostics.VContainerDiagnosticsWindow.OnEnable () (at ./Library/PackageCache/jp.hadashikick.vcontainer@c6f9c51dbc/Editor/Diagnostics/VContainerDiagnosticsWindow.cs:74) UnityEditor.EditorWindow:GetWindow(String) VContainer.Editor.Diagnostics.VContainerDiagnosticsWindow:OpenWindow() (at ./Library/PackageCache/jp.hadashikick.vcontainer@c6f9c51dbc/Editor/Diagnostics/VContainerDiagnosticsWindow.cs:27)

Repeated Exception afterwards
NullReferenceException: Object reference not set to an instance of an object VContainer.Editor.Diagnostics.VContainerDiagnosticsWindow.RenderHeadPanel () (at ./Library/PackageCache/jp.hadashikick.vcontainer@c6f9c51dbc/Editor/Diagnostics/VContainerDiagnosticsWindow.cs:109) VContainer.Editor.Diagnostics.VContainerDiagnosticsWindow.OnGUI () (at ./Library/PackageCache/jp.hadashikick.vcontainer@c6f9c51dbc/Editor/Diagnostics/VContainerDiagnosticsWindow.cs:88) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <9920ff0c944845d7b9f9a61ef1478edc>:0) UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <9920ff0c944845d7b9f9a61ef1478edc>:0) UnityEditor.DockArea.OldOnGUI () (at <9920ff0c944845d7b9f9a61ef1478edc>:0) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7c69dfc1e63a4ea388c73014d3c7ce20>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Debugging shows the treeView as null on line 109 var flattenOn = GUILayout.Toggle(treeView.Flatten, FlattenHeadContent, EditorStyles.toolbarButton);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant