Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If DOT fails to generate a graph can we sfdp instead? #40

Open
spyhunter99 opened this issue Oct 5, 2016 · 11 comments
Open

If DOT fails to generate a graph can we sfdp instead? #40

spyhunter99 opened this issue Oct 5, 2016 · 11 comments

Comments

@spyhunter99
Copy link

spyhunter99 commented Oct 5, 2016

I'm running into some cases where dot is failing to render graphs and in some cases, it actually causes javadocs to fail completely for a module. As a work around I've experimented with using graphiz's sfdp and have had some luck.

question, is there some mechanism I can use to increase the logging in order to identify the root cause of the failure.

finally is the output of sfdp the same output as dot? I have a branch whipped up that will run dot and if it fails, run sfdp before giving up. Is this the right approach? Edit: I can open a PR for this

@dspinellis
Copy link
Owner

I have never seen dot fail on correct input, so this is probably a UMLGraph bug. Can you provide a small example (one class) that replicates it? Running UMLgraph on this class will give you the dot file.

@spyhunter99
Copy link
Author

spyhunter99 commented Oct 6, 2016

Ok i'll see what i can dig up. I'm not 100% sure what causes the issue. I'll try to narrow it down. It seems to happen most frequently on android projects that have dependencies on some of the google services.

@robross0606
Copy link

I'm seeing a TON of graphviz failures/crashes running our source code through the latest release. It is a fairly large code base though. What is the minimum I can send you to help debug this problem?

@ooxi
Copy link

ooxi commented Mar 27, 2018

@robross0606 please don't hijack another issue. graphviz crashes should be reported to graphviz. To reproduce failures it would be nice if you could post the source generated by UMLGraph and graphviz' output :-)

@robross0606
Copy link

robross0606 commented Mar 27, 2018

Apologies, I'm NOT hijacking the issue. I have the same problem. When I said "latest release", I mean the latest release of UMLGraph. I just neglected to mention that I was having the problems via UMLGraph. I am NOT having problems directly with GraphViz. Only running GraphViz thru UMLGraph. And I wasn't adding another issue. I was offering to HELP by providing you with examples of what appears to be the same problem.

@dspinellis
Copy link
Owner

Thank you for the discussion. Does one of you have UMLGraph output that causes GraphViz to crash and a test case that can reproduce it?

@robross0606
Copy link

I'll see if I can generate something. I don't have a small isolated test case yet. It is happening as part of a very large build, so I need to construct something to give you a test case. I can most likely cherry pick some quick samples of UMLGraph output that is causing GraphViz to crash.

@kno10
Copy link
Collaborator

kno10 commented Mar 28, 2018

There are plenty of crash reports for graphviz, and unfortunately it does not appear that they will get fixed anytime soon. I have reported an example graph - generated by UMLgraph, but trimmed down to the minimum - here: https://gitlab.com/graphviz/graphviz/issues/1355
I have the impression it is related to the handling of ports on tables, in particular with implicit "nearest side", and maybe only with multi-edges.

@kno10
Copy link
Collaborator

kno10 commented Mar 28, 2018

I made a pull request #47 with a tiny change that seems to avoid the bug for me.
@spyhunter99 @robross0606 can you try if adding the :c to the port attachments helps?

@kno10
Copy link
Collaborator

kno10 commented Mar 28, 2018

Btw, an alternative would be to use http://viz-js.com/ in the browser instead of graphviz at generation time. Apparently this is graphviz compiled into JavaScript. It renders the example linked above correctly.

@kno10
Copy link
Collaborator

kno10 commented Oct 27, 2018

@spyhunter99 @robross0606 do you still see these problems? Right now, it works again for me; maybe because of a change in the graphviz package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants