I am having the same problem (dhtmlxgantt Enterprise version 4.0.0).
The following can be used to reproduce the error.
I am unable to create a link from Task 1.1 to Task 2.1 in the UI.
var tasks = {
data:[
{id:1, text:"Main Project", type:"project", order:1, open: true},
{id:2, text:"Sub-Project 1", type:"project", order:2, open: true, parent:1},
{id:3, text:"Task #1.1", start_date:"10-12-2015", duration:2, order:3, progress:0.6, parent: 2},
{id:4, text:"Task #1.2", start_date:"12-12-2015", duration:2, order:4, progress:0.6, parent: 2},
{id:5, text:"Task #1.3", start_date:"14-12-2015", duration:2, order:5, progress:0.6, parent: 2},
{id:6, text:"Sub-Project 2", type:"project", order:2, open: true, parent:1},
{id:7, text:"Task #2.1", start_date:"11-12-2015", duration:2, order:3, progress:0.6, parent: 6},
{id:8, text:"Task #2.2", start_date:"13-12-2015", duration:2, order:4, progress:0.6, parent: 6},
{id:9, text:"Task #2.3", start_date:"15-12-2015", duration:1, order:5, progress:0.6, parent: 6},
{id:10, text:"Task #3", start_date:"17-12-2015", duration:2, order:5, progress:0.6, parent: 1},
],
links:[
{ id:1, source:3, target:4, type:"0"},
{ id:2, source:4, target:5, type:"0"},
{ id:3, source:5, target:10, type:"0"},
{ id:4, source:7, target:8, type:"0"},
{ id:5, source:8, target:9, type:"0"},
{ id:6, source:9, target:10, type:"0"},
]
};
gantt.config.auto_scheduling_initial = true;
gantt.config.auto_scheduling_strict = true;
gantt.config.auto_scheduling = true;
gantt.init("gantt_here");
gantt.parse(tasks);
The test for circular dependency is failing within an inner loop of gantt._checkCircularDependency (in dhtmlxgantt_auto_scheduling.js), where it recurses into checking the links of the target task.
It sees that Task #3 was seen in the checks for links from Task 1.1. However this is not a circular dependency.
Hope that helps in tracking this issue down.