Potential bug in RichPath.Initialize()

After updating to 4.3.88 I’ve been encountering an issue where RichAI agents would not use a custom NodeLink2 and an error was thrown about a null reference exception. Looking at the code I found that it occurs on an Assert which is trying to make sure two link nodes reference the same concrete link

Assert.AreEqual(nl.linkConcrete, (nodes[i+1] as LinkNode).linkConcrete);

However stepping through the code what I found is that instead of comparing the first link node to the second link node it is getting the node after the link. Since for me that is a TriangleMeshNode rather than a LinkNode it can’t reference linkConcrete.

Changing the assert to use nodes[i] instead seems to have fixed the issue for me.

Hi

Thanks! That was indeed a bug introduced in the latest beta.
I’ll include a fix in the next beta update.

1 Like