Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002330graphvizDotpublic2013-08-15 02:042013-08-31 16:12
Reporterstonecheung 
Assigned To 
PrioritynormalSeveritycriticalReproducibilityalways
StatusnewResolutionopen 
PlatformAllOSAllOS VersionAll
Summary0002330: graph's aspect attribute cause dupliated edges in output image!
DescriptionA simple test.dot file contains bidirected edge and with aspect attribute set to 1.
-----
digraph test {
graph [aspect=1];
"Point1" -> "Point2" [];
"Point2" -> "Point1" [];
}
-----

When this test.dot file processed by graphviz application(both command-line and GUI tool), the output image will contain 4 extra "Point2" -> "Point1" edge eages(seems the "Point2" -> "Point1" edge duplicated)!

If remove the graph's aspect attribute, everything will be OK!
Steps To ReproduceA simple test.dot file contains bidirected edge and with aspect attribute set to 1.
-----
digraph test {
graph [aspect=1];
"Point1" -> "Point2" [];
"Point2" -> "Point1" [];
}
-----

When this test.dot file processed by graphviz application(both command-line and GUI tool), the output image will contain 4 extra "Point2" -> "Point1" edge eages(seems the "Point2" -> "Point1" edge duplicated)!
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSIONAll
Attached Filesdot file icon test.dot [^] (84 bytes) 2013-08-15 02:04
png file icon test.png [^] (8,323 bytes) 2013-08-15 02:04

- Relationships

-  Notes
User avatar (0000442)
stonecheung (reporter)
2013-08-25 22:59

This problem is very important to me, could you please take a look at it? Thanks!
User avatar (0000467)
Abyssoft (reporter)
2013-08-31 15:07

testing with win7sp1 version 2.33.20130831
Confirmed duplication of arrows in output, in this scenario dot does not crash with the presence of aspect. please see 0002329 for more on aspect crash.
User avatar (0000469)
Abyssoft (reporter)
2013-08-31 16:12

testing with win7sp1 version 2.33.20130831
Found a partial workaround for this issue and a way of storying the errorstate although it is quite complex


ERRORSTATE

Given a graph or digraph

When there are 1 node and aspect has been set and there is at least 1 reflexive edge
Then each reflexive edge is pentifuricated (duplicated for a total of 5 edges).
digraph{
graph[aspect=1];
1->1;
}

When there are 2 nodes and aspect has been set and there are 2 or more edges between 2 nodes
Then each edge subsequent to the first is pentifuricated (duplicated for a total of 5 edges).
digraph{
graph[aspect=1];
1;2;
1->2;1->2;
}

When there are 2 nodes and aspect has been set and there is at least 1 reflexive edge
Then the reflexive edge is duplicated.
digraph{
graph[aspect=1];
1;2;
1->2;1->1;
}

When there are 3 nodes and aspect has been set and there are 2 or more edges between 2 nodes
Then each edge subsequent to the first between 2 nodes is pentifuricated (duplicated for a total of 5 edges).
digraph{
graph[aspect=1];
1;2;3;
1->2;1->3;1->2;
}

when there are 3 nodes and aspect has been set and there is at least 1 reflexive edge
Then the reflexive edge is at least duplicated.
//duplication of reflexive edge
digraph{
graph[aspect=1];
1;2;3;
1->2;1->3;3->3;
}
//triplication of reflexive edge
digraph{
graph[aspect=1];
1;2;3;
1->2;1->3;1->1;
}

When there are 4 nodes and aspect has been set and there is at least 1 reflexive edge
Then each reflexive edge is quadricated (duplicated for a total of 4 edges)
digraph test {
graph [aspect=1];
1[];
2[];
3[];
4[];
1->2;2->3;3->4;1->2;
}

When there are 4 nodes and aspect has been set and there are 2 or more edges between 2 nodes
Then each edge subsequent to the first is pentifuricated (duplicated for a total of 5 edges).
digraph test {
graph [aspect=1];
1[];
2[];
3[];
4[];
1->2;2->3;3->4;1->2;
}

When there are 4 nodes and aspect has been set and there are 2 or more edges between 2 nodes or 2 different sets
Then each edge subsequent to the first is pentifuricated (duplicated for a total of 5 edges).
// Two instances of pentifurication
digraph{
graph[aspect=1];
1[];
2[];
3[];
4[];
1->2;2->3;3->4;
1->2;3->4;
}

EXCEPTION
However - When there are 4 nodes and aspect has been set and there are 2 or more edges between 2 nodes (1->2;2->1;) and 2 edges from 1st node to the remaining 2 (1->3; 1->4;)
Then the correct rendering occurs on the multiple edge.
digraph{
graph[aspect=1];
1[];
2[];
3[];
4[];
1->2;2->1;
1->3;1->4;
}

WORKAROUND
Using the exception we can make a partial workaround
digraph{
graph[aspect=1];
1[];
2[];
3[style=invis];
4[style=invis];
1->2;2->1;
1->3[color=none];1->4[color=none];
}

ADDITIONAL OBSERVATIONS
As more nodes/edges are added the behavior becomes increasingly complex and difficult to describe.

- Issue History
Date Modified Username Field Change
2013-08-15 02:04 stonecheung New Issue
2013-08-15 02:04 stonecheung File Added: test.dot
2013-08-15 02:04 stonecheung File Added: test.png
2013-08-25 22:59 stonecheung Note Added: 0000442
2013-08-31 15:07 Abyssoft Note Added: 0000467
2013-08-31 16:12 Abyssoft Note Added: 0000469


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker