magjac/graphviz-visual-editor

Having a node called `toString` hard crashes the editor

Closed this issue · 2 comments

  1. Go to http://magjac.com/graphviz-visual-editor/
  2. Paste the following graph:
strict digraph G {
  a -> toString;
  toString -> a;
}

Expected:

It renders 2 nodes, called a and toString and draws arrows between them, as shows with other tools like https://dreampuf.github.io/GraphvizOnline/#strict%20digraph%20G%20%7B%0A%20%20%0A%20%20a%20-%3E%20toString%3B%0A%20%20toString%20-%3E%20a%3B%0A%7D

Actual

The whole page turns white and it logs the following error to the console:

Uncaught TypeError: this.nodes[o].locations is undefined

Thanks for the report. This bug has the same root cause as #265. I have a fix available, but it exposed a similar d3-graphviz issue which I have fixed, but not made any release of yet, since I'm waiting for the new Graphviz 10.0.1 release to be available in a new release of hpcc-js-wasm which d3-graphviz depends on. It should imminent, but there's been some hickup that is being discussed here and here.

Fixed by #277.