NorthwoodsSoftware / GoJS

JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
http://gojs.net
Other
7.7k stars 2.86k forks source link

addNodeAndLink function crashing #147

Closed hmorkonda closed 3 years ago

hmorkonda commented 3 years ago

https://gojs.net/latest/intro/selection.html#MoreComplexAdornments

I am trying to copy paste and run the exact same code in the browser. However, the program crashes when adding node to child of a child. I have also used online compilers to test and run. Please clarify.

Here's a link to my full code: https://replit.com/@HarineeMorko/WhoppingWiltedFactorial#index.html

WalterNorthwoods commented 3 years ago

We'll investigate. Thanks for reporting the problem.

WalterNorthwoods commented 3 years ago

The browser didn't "crash", did it? Do you mean that the browser seemed to "hang"?

I think the problem is that the link route computation happen to run into a case that feels like an infinite loop, although in reality it was just extremely slow because the iterations were huge. And I think that case, which took me a while to reproduce reliably, was due to tiny floating point errors which we were not accounting for.

Anyway, soon that will be fixed in the next release, 2.1.45. Thank you again for reporting the issue.