Modify

Ticket #8681 (closed Bugs: fixed)

Opened 11 months ago

Last modified 10 months ago

read_graphviz throws exception with file that dot program reads successfully

Reported by: anonymous Owned by: jewillco
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

boost-test.cpp Download (6.5 KB) - added by anonymous 11 months ago.
test.dot Download (747 bytes) - added by anonymous 11 months ago.
dot file which yields exception

Change History

Changed 11 months ago by anonymous

Changed 11 months ago by anonymous

dot file which yields exception

comment:1 in reply to: ↑ description Changed 11 months ago by anonymous

exception message is:

Invalid start token for statement (token is "<eof> ")

comment:2 Changed 11 months ago by anonymous

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 Changed 11 months ago by anonymous

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 Changed 10 months ago by jewillco

  • Owner set to jewillco
  • Component changed from None to graph

comment:5 Changed 10 months ago by jewillco

  • Status changed from new to closed
  • Resolution set to fixed

(In [84725]) Changed comments to be non-greedy; fixes #8681

comment:6 Changed 10 months ago by jewillco

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.

comment:7 Changed 10 months ago by anonymous

thank you!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.