adrai / adrai/flowchart.js

Maxcallstack exceeded issue

Đang mở
#231 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
8.7k
Fork
1.2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi there, i've run into an issue where an infinite loop happens and maximum call stack exceeded ends up being called. I've simplified the chart to the minimum to replicate the issue :

start=>start: Start
op1=>operation: Operation 1
cond2=>condition: Condition 2
cond3=>condition: Condition 3
cond4=>condition: Condition 4
op5=>operation: Operation 5
op6=>operation: Operation 6
end=>end: End
start->op1
op1->cond2
cond2(yes)->cond3
cond2(no,left)->op5
cond3(yes,right)->cond4
cond3(no)->op6
cond4(yes)->cond2
cond4(no)->end

cond4(yes)->cond2 is the culprit, removing cond2 makes the chart resolve fine. From what the console.logs could tell me it looks like it loops Condition 2, Condition 3 and Condition 4 in sequence indefinitely. If i change one condition 2 or 3 to an operation it does not do it anymore. I suspect it might have to do with having 3 conditions in a row (plus trying to route yes to cond2)?

Also if i swap the targets for no/yes for cond4 it works as well.

Thanks and good day

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.