I assume you have setup your domain model as suggested in the documentation and you have a Dependencies attribute for the GanttChart entity.
The problem you are facing is caused by the circular dependies that may have been created by your code. For example you have created 3 tasks TaskA,TaskB, TaskC with the following dependencies.
TaskA --> TaskB --> TaskC --> TaskA
In the above example there's a circular dependency in task relationships (A task depends on another task that eventually depends back on the original task, creating an infinite loop).
I would suggest you to check your code where you have defined the dependincies. For testing you can remove Dependencies setting at first and / or create a debugger breakpoint and debug your code step by step.