FlowCanvas Forums › Support › Encountered two console errors
I love working with FlowCanvas, it’s helped me prototype out much more quickly than in code.
Now, I have run into two issues with the new release. I have workarounds, so I didn’t think about posting them here, but it was recommended for me on the Discord to post here as well, so here goes.
One error is that, with the External Inspector open, I am getting errors every time I select a GameObject.
To further isolate the error, I started a brand-new empty project (Unity 2018.4.14). I added FC3.0.3. (I have not added a FlowScript Controller or any components yet, just an empty scene with the default camera and light).
I then open Tools | ParadoxNotion | FlowCanvas | External Inspector Panel.
Now, with the External Inspector Panel open, I get a TargetParameterCountException error every time I select a new GameObject in the hierarchy.
TargetParameterCountException: Number of parameters specified does not match the expected number.
System.Reflection.MonoMethod.ConvertValues (System.Reflection.Binder binder, System.Object[] args, System.Reflection.ParameterInfo[] pinfo, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) (at :0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :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.OnSelectionChange () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:199)
Second error. Same project conditions, only I imported the FlowCanvas “SpinFace” demo from the website. When I drag a line out to the right from any value port, I get an ExitGUIException error.
ExitGUIException: Exception of type ‘UnityEngine.ExitGUIException’ was thrown.
UnityEngine.GUIUtility.ExitGUI () (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:156)
UnityEditor.PopupWindow.Show (UnityEngine.Rect activatorRect, UnityEditor.PopupWindowContent windowContent, UnityEditor.PopupLocation[] locationPriorityOrder, UnityEditor.ShowMode showMode) (at C:/buildslave/unity/build/Editor/Mono/GUI/PopupWindow.cs:57)
UnityEditor.PopupWindow.Show (UnityEngine.Rect activatorRect, UnityEditor.PopupWindowContent windowContent, UnityEditor.PopupLocation[] locationPriorityOrder) (at C:/buildslave/unity/build/Editor/Mono/GUI/PopupWindow.cs:44)
UnityEditor.PopupWindow.Show (UnityEngine.Rect activatorRect, UnityEditor.PopupWindowContent windowContent) (at C:/buildslave/unity/build/Editor/Mono/GUI/PopupWindow.cs:39)
ParadoxNotion.Design.GenericMenuBrowser.ShowAsync (UnityEngine.Vector2 pos, System.String title, System.Type keyType, System.Func`1[TResult] getMenu) (at Assets/ParadoxNotion/CanvasCore/Common/Design/PartialEditor/GenericMenuBrowser.cs:164)
FlowCanvas.FlowNode+<>c__DisplayClass96_0.b__1 () (at Assets/ParadoxNotion/FlowCanvas/Modules/FlowGraphs/FlowNode.cs:701)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:209)
Additionally, on a different project, if I drag a line out from a non-Unity type, the “Add & Connect” window never advances beyond the “Loading…” bar.
Hello from here as well! 🙂
I am really glad you like FlowCanvas! Thank you for your comment and for taking the time to write this report.
The first issue is known at this time, but unfortunately, I haven’t yet been able to “fix” it. The weird thing is that within the call stack, there is actually no call to any Node/FlowCanvas methods at all. I have even tried removing all code of ExternalInspectorWindow (except the one that opens it up) and the error still exists. So, that is even weirder. I will keep looking for it though.
Regarding your 2nd issue, hmmm. It may have to do with some specific type in your Preferred Types. Can you please temporarily try to “Reset” the Preferred Types to the default ones and let me know if this behaviour still happens? (If you don’t want to lose your preferrred types, you can export them and import them back later).
Let me know.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Resetting Preferred Types had no noticeable affect on our main project. Still got the ExitGUI error, still got the “Loading…” bug.
I’m not sure what causes the ExitGUI error — it even happens on a brand-new 2018.4.20f1 project with only FlowCanvas and the Clock demo from the Downloads page. (No PreferredTypes set). With this brand-new project, if I go to drag nodes out from any of the ports on ClockParent, I get the ExitGUI exception — but unlike with our game project, the “Loading…” disappears almost immediately and the “Add & Connect” window is usable.
If, using this same brand-new project, I create a new bound FlowScript on a different object, the ExitGUI exception does not occur. I wonder if it could be something in the graph serialization?
Hello,
So, I was able to reproduce this issue with exit gui. It happens only in Unity 2018 (does not happen in Unity 2019) and only when you are zoomed out (even a tiny bit). When fully zoomed in or in Unity 2019, this does not happen. (It seems that whatever is causing this, got fixed in Unity 2019). Can you please confirm my findings regarding this only happening when zoomed out?
Thank you!
Join us on Discord: https://discord.gg/97q2Rjh
Confirmed! The ExitGUI error only occurs when zoomed out. Thank you!
The “Loading…” error is likely one of our custom nodes but I’m tracing that now. Something (probably one of our custom nodes) is causing AppendFlowNodesMenu to halt prematurely. Will let you know what I find. 🙂
Thanks again!
Yeah, it was just four of our custom nodes. When info.MakeGenericInfo was run, our nodes were throwing an exception of “The number of generic arguments provided doesn’t equal the arity of the generic type definition.” that was causing the procedure to abort silently.
This temporary fix to AppendFlowNodesMenu caught the exceptions, thus reminding me to solve the node issues:
1 2 3 4 5 6 7 8 9 10 11 |
if (contextPort.IsValuePort() && info.originalType.IsGenericTypeDefinition) { try { var genericInfo = info.MakeGenericInfo(contextPort.type); if (genericInfo.isValid) { info = genericInfo; generalized.Add(info.originalType); } } catch(System.Exception e) { Debug.LogError("Exception caused by node [" + info.name + "]: (" + e.Message + ")"); } } |
Hey,
Thanks for the extra info. What kind of nodes, your custom nodes are? Are they made by inheriting Simplex Nodes like PureFunction, CallbableFunction nodes etc?
Join us on Discord: https://discord.gg/97q2Rjh
These three nodes cause the problems:
1 2 3 |
public class InputListenerNode<T1, TEvent> : InputListenerNode<TEvent> where TEvent : UnityEvent<T1> public class InputListenerNode<T1, T2, TEvent> : InputListenerNode<TEvent> where TEvent : UnityEvent<T1, T2> public class InputListenerNode<T1, T2, T3, TEvent> : InputListenerNode<TEvent> where TEvent : UnityEvent<T1, T2, T3> |
They derive from these base classes:
1 2 3 |
[Description("An Input listener node.")] public abstract class InputListenerNode : FlowNode public abstract class InputListenerNode<TEvent> : InputListenerNode |
(As for the fourth node I mentioned in a previous post: I was able to solve that problem by declaring it abstract, since it’s never called directly.)
Amendment: Those three nodes are supposed to be abstract too. Declaring them abstract makes the errors go away entirely.
Which I wouldn’t have found if not for the help in scoping down the cause of the ExitGUI bug. So — thanks again for all your help!
Great! Thanks for the follow-up! 🙂
Join us on Discord: https://discord.gg/97q2Rjh