Reply To: Crash when deleting nodes or removing connections.

FlowCanvas Forums Support Crash when deleting nodes or removing connections. Reply To: Crash when deleting nodes or removing connections.

#2511
ozeki
Participant

Hey,

So I have taken a deeper look at this and I still can’t figure out why it is crashing sometimes but I did discovered something very strange. Whenever a FlowController component exists within the same GameObject as an UnityEngine.UI.Image component within a Nested Prefab setup (!thats the important part!), the graph starts behaving extremely strangely very reminiscent of the problems I would see before it would eventually crash.

I have made a example project as well as a video show the problem. Hopefully it can point to what is going on. I also went through the code with the debugger and noticed that there is a peculiar bug that happens when in this configuration when trying to add or delete nodes and node connections (which is usually where the crash occurs).

Specifically, in the NodeCanvas.Framework.Graph.AssignNodeID() method of theĀ  ParadoxNotion\Assets\ParadoxNotion\CanvasCore\Framework\Runtime\Graphs\Graph.cs : class at line 458, sometimes the value of lastID will be larger than the contents of the parsed Node[] list for some reason. I’m not sure if this is related or a separate issue.

In context:

I recommend you take a look at the video first and then you can get in touch with me and I can send you the demo project I have if you want to take a look at it on your side (I don’t want to distribute your plugin by linking the demo project publicly). I am also on the Discord channel, if it is any easier we can talk over there.

Here is the screen capture video that illustrates the glitch:
https://youtu.be/PPiRTGWTtts