Comments (7)
Seems related to hpcc-systems/hpcc-js-wasm#139
from d3-graphviz.
Hi, @magjac I found another case about this problem, could you please help?
If you change dot string to this, also have this problem:
digraph {graph [style="filled",fillcolor="#edf0f7",color="grey50"]
node [style="filled",fillcolor="#a2b4d6",color="#000000",fontname="Helvetica",fontsize="14",shape="polygon"]
edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]
subgraph "cluster_moe_f721"{ id="moe_f721" style="filled, dashed" label="moe" "cli_8678" "interface_5488" "msglib_d0ce" "publib_9f09" "scriptlib_868c" "system_b545"subgraph
"cluster_cfg_d15b"{ id="cfg_d15b" style="filled, bold" label="cfg" "interface_d8bd" "src_6fb0"}}"cli_8678" [id="cli_8678" label="cli" tooltip="src/moe/cli/"];
"system_b545" [id="system_b545" label="system" tooltip="src/moe/system/"];
"cli_8678" -> "interface_d8bd" [id="cli_8678^interface_d8bd" label="3418" ];
"msglib_d0ce" -> "interface_d8bd" [id="msglib_d0ce^interface_d8bd" label="68" ];
"publib_9f09" -> "interface_d8bd" [id="publib_9f09^interface_d8bd" label="14" ];
"src_6fb0" -> "interface_5488" [id="src_6fb0^interface_5488" label="9435" ];
"src_6fb0" -> "msglib_d0ce" [id="src_6fb0^msglib_d0ce" label="698" ];
"src_6fb0" -> "publib_9f09" [id="src_6fb0^publib_9f09" label="13953" ];
"src_6fb0" -> "scriptlib_868c" [id="src_6fb0^scriptlib_868c" label="708" ];
"src_6fb0" -> "system_b545" [id="src_6fb0^system_b545" label="1197" ];
"src_6fb0" -> "interface_d8bd" [id="src_6fb0^interface_d8bd" label="17687" ];
}
from d3-graphviz.
I seems to me that the problem is in Graphviz itself. See https://gitlab.com/graphviz/graphviz/-/issues/2331 and https://gitlab.com/graphviz/graphviz/-/merge_requests/3016.
Your second example is not valid DOT source and gives syntax error in line 16 near ';'
.
from d3-graphviz.
Some debugging shows that the error exists already in hpcc-js/wasm and is index out of bounds
:
This error probably comes from Graphviz itself from an assertion in lib/cgraph/list.h
.
from d3-graphviz.
Thanks reply.
Your second example is not valid DOT source and gives syntax error in line 16 near ';'.
-
There is an extra ';' at the end, I removed it and update the comment, and seems the dot string has performance problem, http://magjac.com/graphviz-visual-editor/ keep running and after I pasted this dot string, not sure if it's the same root cause.
-
Also tested these dot string in
@hpcc-js/wasm
with version 1.20.1 and 2.xx, and I found this problem only happens in 2.xx, maybe there are some problems in 2.xx.
I will post this issue to @hpcc-js/wasm
, and discuss there. Maybe I can use older version of d3-graphviz until this problem solved. Thanks!
from d3-graphviz.
I took the orig DOT and fixed it to:
digraph {graph [style="filled",fillcolor="#edf0f7",color="grey50"]
node [style="filled",fillcolor="#a2b4d6",color="#000000",fontname="Helvetica",fontsize="10",shape="polygon"]
edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]
subgraph "cluster_oam_a1a9"{ id="oam_a1a9" style="filled, dashed" label="oam" "common_adfb" "lldp_07c4"
subgraph "cluster_common_adfb"{ id="common_adfb" style="filled, bold" label="common" "data_thread_d165" "dwn_thread_dc59" "init_da14" "sync_thread_8499"}}"common_adfb" [id="common_adfb" label="common" tooltip="src/oam/common/"];
"init_da14" [id="init_da14" label="init" tooltip="src/oam/common/init/"];
"sync_thread_8499" [id="sync_thread_8499" label="sync_thread" tooltip="src/oam/common/sync_thread/"];
"lldp_07c4" [id="lldp_07c4" label="lldp" tooltip="src/oam/lldp/"];
"data_thread_d165" [id="data_thread_d165" label="data_thread" tooltip="src/oam/common/data_thread/"];
"dwn_thread_dc59" [id="dwn_thread_dc59" label="dwn_thread" tooltip="src/oam/common/dwn_thread/"];
"common_adfb" -> "init_da14" [id="common_adfb^init_da14" label="13" color="red"];
"common_adfb" -> "sync_thread_8499" [id="common_adfb^sync_thread_8499" label="3" color="red"];
"common_adfb" -> "lldp_07c4" [id="common_adfb^lldp_07c4" label="7" color="red"];
"common_adfb" -> "data_thread_d165" [id="common_adfb^data_thread_d165" label="4" color="red"];
"common_adfb" -> "dwn_thread_dc59" [id="common_adfb^dwn_thread_dc59" label="2" color="red"];
"init_da14" -> "common_adfb" [id="init_da14^common_adfb" label="10" color="red"];
"init_da14" -> "lldp_07c4" [id="init_da14^lldp_07c4" label="3" color="red"];
"init_da14" -> "data_thread_d165" [id="init_da14^data_thread_d165" label="1" color="red"];
"init_da14" -> "dwn_thread_dc59" [id="init_da14^dwn_thread_dc59" label="1" color="red"];
"init_da14" -> "sync_thread_8499" [id="init_da14^sync_thread_8499" label="1" color="red"];
"sync_thread_8499" -> "common_adfb" [id="sync_thread_8499^common_adfb" label="7" color="red"];
"sync_thread_8499" -> "init_da14" [id="sync_thread_8499^init_da14" label="4" color="red"];
"sync_thread_8499" -> "data_thread_d165" [id="sync_thread_8499^data_thread_d165" label="1" color="red"];
"sync_thread_8499" -> "lldp_07c4" [id="sync_thread_8499^lldp_07c4" label="1" color="red"];
"lldp_07c4" -> "common_adfb" [id="lldp_07c4^common_adfb" label="29" color="red"];
"lldp_07c4" -> "init_da14" [id="lldp_07c4^init_da14" label="21" color="red"];
"lldp_07c4" -> "sync_thread_8499" [id="lldp_07c4^sync_thread_8499" label="2" color="red"];
"lldp_07c4" -> "data_thread_d165" [id="lldp_07c4^data_thread_d165" label="5" color="red"];
"lldp_07c4" -> "dwn_thread_dc59" [id="lldp_07c4^dwn_thread_dc59" label="1" color="red"];
"data_thread_d165" -> "common_adfb" [id="data_thread_d165^common_adfb" label="2" color="red"];
"data_thread_d165" -> "init_da14" [id="data_thread_d165^init_da14" label="1" color="red"];
"data_thread_d165" -> "lldp_07c4" [id="data_thread_d165^lldp_07c4" label="2" color="red"];
"dwn_thread_dc59" -> "common_adfb" [id="dwn_thread_dc59^common_adfb" label="3" color="red"];
"dwn_thread_dc59" -> "init_da14" [id="dwn_thread_dc59^init_da14" label="1" color="red"];
"dwn_thread_dc59" -> "lldp_07c4" [id="dwn_thread_dc59^lldp_07c4" label="1" color="red"];
"dwn_thread_dc59" -> "data_thread_d165" [id="dwn_thread_dc59^data_thread_d165" label="1" color="red"];
}
(There was an issue with a missing space before the second subgraph)
And pasted it into: https://observablehq.com/@gordonsmith/graphviz-wasm-example
from d3-graphviz.
@GordonSmith Seems it's not related the space
, even without space, https://observablehq.com/@gordonsmith/graphviz-wasm-example still can show the graph. But the first click on submit button will get Error: memory access out of bounds
, then click submit again, it works well.
Here is my reproduce steps(I made screenshots, but it's blocked by company network):
- Refresh page, paste origin dot string, it needs to two clicks on submit button to show correct graph.
- Refresh page, paste your fixed dot string, it needs to two clicks on submit button to show correct graph.
- Refresh page, paste dot string from #280 (comment), it needs to three clicks on to show correct graph.
BTW, after the graph works, paste any above dot string, it works well. That's strange.
from d3-graphviz.
Related Issues (20)
- can not run in react project HOT 3
- Cannot find wasm files HOT 3
- how can i get the current scale? HOT 1
- Failed to resolve entry for package "d3-graphviz" HOT 11
- Git Release missing HOT 1
- not render with this renderDot HOT 5
- Can u produce a v5 sample? HOT 1
- graphvizlib.wasm missing in 5.0 HOT 1
- Multiple graphs within same SVG HOT 2
- Modify node shape from javascript HOT 1
- Have you considered writing an accompanying drag-and-drop node feature? HOT 3
- When is it appropriate to upgrade from v4 to v5? HOT 1
- Can not draw an edge in the graph HOT 2
- The graph is not being displayed
- Enable d3-graphviz API to set graph attributes in the DOT source HOT 2
- Transition type error in typescript HOT 2
- Upgrade examples to library version 5.x HOT 2
- webpack4 throw cannot resolve "@hpcc-js/wasm/graphviz"
- Render transitive reduction filter directed graph HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-graphviz.