1 (edited by philzmz 2020-08-02 18:02:26)

Topic: Strange bug ???

Hello !
I installed today UContext (so the last version) which seems awesome, but when I hit play, the hierarchy displays only 6 lines, I have to reload the scene to recover the full hierarchy.
Here is a video describing this issue : https://www.youtube.com/watch?v=hEseIUGbg-U (After 17s you can jump to 1mn.)
If I remove the UContext folder I don't have this issue anymore.
If you have an idea ?

Best regards.

Re: Strange bug ???

Hello.

Thanks for the bug report, but I'm not sure that the problem is in the uContext.
I tested this on my side and it works correctly.

What I see in your video:
1. You have an exception in the console from the start of the video that does not disappear after the start of the scene.
2. You have other assets that modify the hierarchy.
3. At the start of the scene, you have six items in the hierarchy and a scroll, which means that the problem occurs on the sixth or seventh item, in the script that draws / modifies the items of the hierarchy.
In your video, I did not see the things that uContext draws, so the problem is most likely in some other asset.
4. When you scroll the list of items in the hierarchy, the item that was causing the problem leaves the window and the rest of the items are displayed correctly.

To understand which asset is causing the problem, please attach a stack trace of the exceptions you have.
If the problem is in uContext I will quickly fix it and send you a modified files.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

3 (edited by philzmz 2020-08-03 10:57:23)

Re: Strange bug ???

I removed Rainbow Hierarchy, the problem is still there.
I removed the object on the 7th line of the hierarchy, same.

Here are the 4 errors that loop in the console, maybe this could help ?
The 4th error appears exiting the play mode.
Tell me if you need anything else.

PunBB bbcode test

NullReferenceException: Object reference not set to an instance of an object
InfinityCode.uContext.Tools.HierarchyErrors.DrawHierarchyItem (System.Int32 id, UnityEngine.Rect rect) (at Assets/Plugins/Infinity Code/uContext/Scripts/Editor/Tools/HierarchyErrors.cs:28)
InfinityCode.uContext.HierarchyItemDrawer.OnHierarchyItemGUI (System.Int32 id, UnityEngine.Rect rect) (at Assets/Plugins/Infinity Code/uContext/Scripts/Editor/Managers/HierarchyItemDrawer.cs:29)
UnityEditor.SceneHierarchy.OnRowGUICallback (System.Int32 instanceID, UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:628)
UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row, System.Single rowWidth, System.Boolean hasFocus) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:501)
UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (System.Int32 firstRow, System.Int32 numVisibleRows, System.Single rowWidth, System.Boolean hasFocus) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:692)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:595)
UnityEditor.SceneHierarchy.DoTreeView (System.Single searchPathHeight) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:744)
UnityEditor.SceneHierarchy.OnGUI (UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:577)
UnityEditor.SceneHierarchyWindow.DoSceneHierarchy () (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:149)
UnityEditor.SceneHierarchyWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:133)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
_______________________
GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
_______________________
NullReferenceException: Object reference not set to an instance of an object
InfinityCode.uContext.Tools.HierarchyErrors.DrawHierarchyItem (System.Int32 id, UnityEngine.Rect rect) (at Assets/Plugins/Infinity Code/uContext/Scripts/Editor/Tools/HierarchyErrors.cs:28)
InfinityCode.uContext.HierarchyItemDrawer.OnHierarchyItemGUI (System.Int32 id, UnityEngine.Rect rect) (at Assets/Plugins/Infinity Code/uContext/Scripts/Editor/Managers/HierarchyItemDrawer.cs:29)
UnityEditor.SceneHierarchy.OnRowGUICallback (System.Int32 instanceID, UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:628)
UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row, System.Single rowWidth, System.Boolean hasFocus) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:501)
UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (System.Int32 firstRow, System.Int32 numVisibleRows, System.Single rowWidth, System.Boolean hasFocus) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:692)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:595)
UnityEditor.SceneHierarchy.DoTreeView (System.Single searchPathHeight) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:744)
UnityEditor.SceneHierarchy.OnGUI (UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:577)
UnityEditor.SceneHierarchyWindow.DoSceneHierarchy () (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:149)
UnityEditor.SceneHierarchyWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:133)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher.PropagateEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:754)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:599)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
___________________________________
NullReferenceException: Object reference not set to an instance of an object
InfinityCode.uContext.Tools.HierarchyErrors.DrawHierarchyItem (System.Int32 id, UnityEngine.Rect rect) (at Assets/Plugins/Infinity Code/uContext/Scripts/Editor/Tools/HierarchyErrors.cs:28)
InfinityCode.uContext.HierarchyItemDrawer.OnHierarchyItemGUI (System.Int32 id, UnityEngine.Rect rect) (at Assets/Plugins/Infinity Code/uContext/Scripts/Editor/Managers/HierarchyItemDrawer.cs:29)
UnityEditor.SceneHierarchy.OnRowGUICallback (System.Int32 instanceID, UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:628)
UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row, System.Single rowWidth, System.Boolean hasFocus) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:501)
UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (System.Int32 firstRow, System.Int32 numVisibleRows, System.Single rowWidth, System.Boolean hasFocus) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:692)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:595)
UnityEditor.SceneHierarchy.DoTreeView (System.Single searchPathHeight) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:744)
UnityEditor.SceneHierarchy.OnGUI (UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchy.cs:577)
UnityEditor.SceneHierarchyWindow.DoSceneHierarchy () (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:149)
UnityEditor.SceneHierarchyWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneHierarchyWindow.cs:133)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher.PropagateEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:754)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:599)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

Re: Strange bug ???

Thanks for the stack trace.
Modified scripts are attached.

Post's attachments

Attachment icon uContext-v1.12.1.1 Hierarchy Error Fix.unitypackage 1.58 kb, 162 downloads since 2020-08-03 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Strange bug ???

Alex Vertax wrote:

Thanks for the stack trace.
Modified scripts are attached.

Great ! Works ! Fantastic support as usual ! Thanks a lot Alex !
One little more thing, not important at all but that might be interesting : I am using 2 screens, and the UContext panel only appears on the main screen, even if the scene window is on the secondary one.

Re: Strange bug ???

Thank you for reporting this.
The problem has been fixed.
Not ideal because Unity doesn't have a working way to get the size of multiple screens, but it will work.
The patch is attached.

Post's attachments

Attachment icon uContext-v1.12.1.1 Context Menu MultiScreen Fix.unitypackage 2.84 kb, 146 downloads since 2020-08-03 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.