adrai / adrai/flowchart.js

Maxcallstack exceeded issue

Aperta
#231 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
8.7k
Fork
1.2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.