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

Deleting an action corrupts graph if 11 or more actions in Action node #16

Closed
pvanallen opened this issue Mar 31, 2019 · 4 comments
Closed
Assignees
Labels
bug Something isn't working urgent top of priority to fix

Comments

@pvanallen
Copy link
Owner

If there are 11 or more actions in an Action node, deleting one action will corrupt the display of the graph and generate the following errors.

Screen Shot 2019-03-29 at 11 34 17 AM

NullReferenceException: Object reference not set to an instance of an object
DelftToolkit.ActionsEditor.<OnCreateReorderableList>m__1 (Rect rect, Int32 index, Boolean isActive, Boolean isFocused) (at /Users/Phil/Dropbox/GitHub/delft-toolkit-current/unity/delft-toolkit/Assets/Scripts/delftToolkit/Nodes/Editor/ActionsEditor.cs:79)
UnityEditorInternal.ReorderableList.DoListElements (Rect listRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:587)
UnityEditorInternal.ReorderableList.DoLayoutList () (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:394)
XNodeEditor.NodeEditorGUILayout.InstancePortList (System.String fieldName, System.Type type, UnityEditor.SerializedObject serializedObject, IO io, ConnectionType connectionType, TypeConstraint typeConstraint, System.Action`1 onCreation) (at /Users/Phil/Dropbox/GitHub/delft-toolkit-current/unity/delft-toolkit/Assets/Scripts/delftToolkit/Submodules/xNode/Scripts/Editor/NodeEditorGUILayout.cs:299)
DelftToolkit.ActionsEditor.OnBodyGUI () (at /Users/Phil/Dropbox/GitHub/delft-toolkit-current/unity/delft-toolkit/Assets/Scripts/delftToolkit/Nodes/Editor/ActionsEditor.cs:48)
XNodeEditor.NodeEditorWindow.DrawNodes () (at /Users/Phil/Dropbox/GitHub/delft-toolkit-current/unity/delft-toolkit/Assets/Scripts/delftToolkit/Submodules/xNode/Scripts/Editor/NodeEditorGUI.cs:322)
XNodeEditor.NodeEditorWindow.OnGUI () (at /Users/Phil/Dropbox/GitHub/delft-toolkit-current/unity/delft-toolkit/Assets/Scripts/delftToolkit/Submodules/xNode/Scripts/Editor/NodeEditorGUI.cs:29)
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)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

======================================

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
@pvanallen pvanallen added bug Something isn't working urgent top of priority to fix labels Mar 31, 2019
@Siccity
Copy link
Collaborator

Siccity commented Mar 31, 2019

Sounds like it could have something to do with the way InstancePortList generates dynamic port names, by adding index number separated by a space. Perhaps I'm checking specifically for one-length numbers only somewhere. I'll have a look at it tomorrow

@Siccity
Copy link
Collaborator

Siccity commented Apr 1, 2019

Most likely related to Siccity/xNode#124

@Siccity
Copy link
Collaborator

Siccity commented Apr 1, 2019

Fixed an error in Siccity/xNode@af0523d
Try pulling latest xNode version and see if the error is fixed

@pvanallen
Copy link
Owner Author

yes, that fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent top of priority to fix
Projects
None yet
Development

No branches or pull requests

2 participants