Reply To: NullReferenceException when playing a build version

FlowCanvas Forums Support NullReferenceException when playing a build version Reply To: NullReferenceException when playing a build version

#1571
robert solero
Participant

Hi Gavalakis and mdemaille,
How are you doing?
Unfortunately I had this issue as well.
I get this error on iOs 11 after i updated to 2.7.0 on a Unity 5.6.0f3.
The error comes from a flow script that I know worked on iOs before the upgrade to 2.7.0. So it must be something due on the update.

NullReferenceException: A null value was found where an object instance was required.
at Basics.<Start>m__1 (Vector3 x) [0x00000] in <filename unknown>:0
at FlowCanvas.BinderConnection
1[T].DoNormalBinding (FlowCanvas.Port source, FlowCanvas.Port target) [0x00000] in <filename unknown>:0
at FlowCanvas.BinderConnection
1[T].Bind () [0x00000] in <filename unknown>:0
at FlowCanvas.BinderConnection.OnDestroy () [0x00000] in <filename unknown>:0
at FlowCanvas.FlowNode.BindPorts () [0x00000] in <filename unknown>:0
at FlowCanvas.FlowGraph.OnGraphStarted () [0x00000] in <filename unknown>:0
at FlowCanvas.BinderConnection.OnDestroy () [0x00000] in <filename unknown>:0
at NodeCanvas.Framework.Graph.StartGraph (UnityEngine.Component agent, IBlackboard blackboard, Boolean autoUpdate, System.Action1 callback) [0x00000] in <filename unknown>:0
at FlowCanvas.FlowGraph.OnGraphStarted () [0x00000] in <filename unknown>:0
at FlowCanvas.BinderConnection.OnDestroy () [0x00000] in <filename unknown>:0
at NodeCanvas.Framework.Graph.StartGraph (UnityEngine.Component agent, IBlackboard blackboard, Boolean autoUpdate, System.Action
1 callback) [0x00000] in <filename unknown>:0
at NodeCanvas.Framework.GraphOwner.StartBehaviour () [0x00000] in <filename unknown>:0
at NodeCanvas.Framework.GraphOwner.Start () [0x00000] in <filename unknown>:0

The main different is that I’m not able to know the Type involved (compared to the FlowCanvas.BinderConnection 1[UnityEngine.Transform].DoNormalBinding) that feature a Transform. I simply have a BinderConnection 1[T].

As far as I understood the issue is because the target port name of the nodes are empty strings, they should all be changed in ” ” (whitespace) in order to make everything work as expected.
As mdemaille shown on the screenshot I inspected the JSON from my flow script. Unfortunately I didn’t find any empty value on all _targetPortName, all are defined value or whitespace along with all

Is there a way for me to determine which is the node that returns the error ?
Is there a way to fix it automatically instead of re-create them one by one?

Thank you again,
Best,
Robert.