#8681 closed Bugs (fixed)
read_graphviz throws exception with file that dot program reads successfully
Reported by: | anonymous | Owned by: | Jeremiah Willcock |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.49.0 | Severity: | Showstopper |
Keywords: | read_graphviz | Cc: |
Description
program exhibiting behavior attached as boost-test.cpp. compiled on g++ (Debian 4.7.2-5) 4.7.2.
compile with "g++ -Wall -std=c++11 -O2 -lboost_system -lboost_graph -o boost-test boost-test.cpp"
dot file attached as test.dot, and pasted below: digraph "flow_graph" {
graph [ ]; node [
shape = "box"
]; edge [ ]; "0" [
label = "_WinMainCRTStartup:\lpush ebp\lmov ebp, esp\lsub esp, 18h\land esp, 0FFFFFFF0h\lmov [esp+18h+var_18], offset _main\lcall _cygwin_crt0\lmov [esp+18h+var_10], 0\lmov [esp+18h+var_14], 0\lmov [esp+18h+var_18], 0\lcall _cygwin_premain0\lmov [esp+18h+var_10], 0\lmov [esp+18h+var_14], 0\lmov [esp+18h+var_18], 0\lcall _cygwin_premain1\lmov [esp+18h+var_10], 0\lmov [esp+18h+var_14], 0\lmov [esp+18h+var_18], 0\lcall _cygwin_premain2\lmov [esp+18h+var_10], 0\lmov [esp+18h+var_14], 0\lmov [esp+18h+var_18], 0\lcall _cygwin_premain3\lleave\lretn\l"
];
node 0 }
Attachments (2)
Change History (9)
by , 9 years ago
Attachment: | boost-test.cpp added |
---|
by , 9 years ago
comment:1 by , 9 years ago
exception message is:
Invalid start token for statement (token is "<eof> ")
comment:2 by , 9 years ago
the comment at boost-test.cpp:5 is incorrect- test_dot was not null-terminated. (std::string was constructed from it using begin and end iterators).
comment:3 by , 9 years ago
from some experimentation, it appears that deleting line 12 in test.dot (i.e. the line containing a comment) causes the exception to not be thrown from read_graphviz.
comment:4 by , 9 years ago
Component: | None → graph |
---|---|
Owner: | set to |
comment:5 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 9 years ago
I fixed that issue. Your code still breaks because you do not define a "shape" property in your dynamic_properties
object, but the file appears to parse correctly.
dot file which yields exception