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
Running ScalaDoc with -diagram fails on OS X 10.9 (Mavericks) #7950
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7950?orig=1 |
@VladUreche said: |
Markus Klink (justjoheinz) said: |
Markus Klink (justjoheinz) said: |
Björn Antonsson (bjorn.antonsson) said: In the meantime you can place this as your dot command first in the path to filter out the warnings. #!/bin/bash
/usr/local/bin/dot "$@" 2> >( grep -v "CoreText performance note:" >&2 ) |
@VladUreche said: |
@Blaisorblade said: Now, since Arial's "Postscript" name seems to ArialMT, I wonder if the font name could be changed to ArialMT for all platforms. Could somebody with a Windows/Linux machine try the change? |
@VladUreche said (edited on Feb 19, 2014 11:00:46 AM UTC): |
@Blaisorblade said (edited on Feb 19, 2014 3:14:44 PM UTC):
Unlike you wrote, currently Scaladoc will not hang. Instead, it will time out. For the scenarios discussed, giving up when there's an error is only an optimization to fail faster. Taking longer to fail when there's an actual setup problem seems acceptable to me, though of course it's a judgment call. So, it seems that scaladoc could just store the standard error, display it if there's a timeout and only log it otherwise. This might also be compatible with the other scenario I observed — spurious failures from What I saw with diagrams-debug was pretty insane. EDIT: the below just documents the heap corruptions, feel free to ignore it. [info] Test Scala API documentation to /Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api...
model contains 120 documentable templates
**********************************************************************
The graphviz dot diagram tool has malfunctioned and will be restarted.
The following is the log of the failure:
DOT <error console>: Warning: Unable to reclaim box space in spline routing for edge "node0" -> "node4". Something is probably seriously wrong.
DOT <error console>: dot(18359,0x7fff78102310) malloc: *** error for object 0x7f861b604f30: pointer being freed was not allocated
DOT <error console>: *** set a breakpoint in malloc_error_break to debug
DOT <error console>: /Users/pgiarrusso/bin/dot: line 2: 18359 Abort trap: 6 /usr/local/bin/dot "$@" 2> >( grep -v "CoreText performance note:" >&2 )
Cleanup: Last template: ilc.language.bacchus.BacchusEvaluationSuite
Cleanup: Last dot input:
digraph G {
compound="true";
rankdir="TB";
node [margin="0.08,0.01", fontsize="10.00", style="filled", height="0.0", penwidth="1", shape="rectangle", width="0.0", fontname="Arial"];
edge [arrowsize="0.5", fontcolor="#aaaaaa", fontsize="10.00", color="#d4d4d4", fontname="Arial"];
subgraph clusterAll {
style="invis"
subgraph clusterOutgoing {
style="invis"
node5 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/class_diagram.png" /></TD><TD VALIGN="MIDDLE">org.scalautils.TripleEquals.Equalizer[BacchusEvaluationSuite] </TD></TR></TABLE>>,fontcolor="#7d7d7d", color="#ababab", id="implicit-outgoing class|graph14_5", fillcolor="#e1e1e1", tooltip="ilc.language.bacchus.BacchusEvaluationSuite can be implicitly converted to org.scalautils.TripleEquals.Equalizer[BacchusEvaluationSuite] by the implicit method convertToEqualizer in trait org.scalautils.TripleEquals"];
node4 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/class_diagram.png" /></TD><TD VALIGN="MIDDLE">org.scalatest.Assertions.Equalizer[BacchusEvaluationSuite] </TD></TR></TABLE>>,fontcolor="#7d7d7d", color="#ababab", id="implicit-outgoing class|graph14_4", fillcolor="#e1e1e1", tooltip="ilc.language.bacchus.BacchusEvaluationSuite can be implicitly converted to org.scalatest.Assertions.Equalizer[BacchusEvaluationSuite] by the implicit method convertToEqualizer in trait org.scalautils.TripleEquals"];
node4 -> node5 [constraint="false", style="invis", minlen="0.0"];
}
subgraph clusterThis {
style="invis"
node0 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/class_diagram.png" /></TD><TD VALIGN="MIDDLE">BacchusEvaluationSuite </TD></TR></TABLE>>,fontcolor="#ffffff", URL="#inheritance-diagram", color="#115F3B", id="this class|graph14_0", fillcolor="#0A955B", tooltip="ilc.language.bacchus.BacchusEvaluationSuite (this class)"];
}
node0 -> node4 [id="implicit-outgoing|0_4", tooltip="BacchusEvaluationSuite can be implicitly converted to org.scalatest.Assertions.Equalizer[BacchusEvaluationSuite], org.scalautils.TripleEquals.Equalizer[BacchusEvaluationSuite]", constraint="false", minlen="2", ltail="clusterThis", lhead="clusterOutgoing", label="implicitly"];
}
node1 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/class_diagram.png" /></TD><TD VALIGN="MIDDLE">FunSuite </TD></TR></TABLE>>,fontcolor="#ffffff", color="#115F3B", id="class|graph14_1", fillcolor="#0A955B", tooltip="org.scalatest.FunSuite"];
node2 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/trait_diagram.png" /></TD><TD VALIGN="MIDDLE">Subjects </TD></TR></TABLE>>,fontcolor="#ffffff", URL="Subjects.html#inheritance-diagram", color="#37657D", id="trait|graph14_2", fillcolor="#498AAD", tooltip="ilc.language.bacchus.Subjects"];
node3 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/trait_diagram.png" /></TD><TD VALIGN="MIDDLE">Evaluation </TD></TR></TABLE>>,fontcolor="#ffffff", color="#37657D", id="trait|graph14_3", fillcolor="#498AAD", tooltip="ilc.language.bacchus.Evaluation"];
node1 -> node0 [id="inheritance|graph14_1_0", tooltip="BacchusEvaluationSuite is a subtype of FunSuite", dir="back", arrowtail="empty"];
node2 -> node0 [id="inheritance|graph14_2_0", tooltip="BacchusEvaluationSuite is a subtype of Subjects", dir="back", arrowtail="empty"];
node3 -> node0 [id="inheritance|graph14_3_0", tooltip="BacchusEvaluationSuite is a subtype of Evaluation", dir="back", arrowtail="empty"];
}
Cleanup: Dot path: dot
Cleanup: Dot exit code: 134
**********************************************************************
Graphviz will be restarted...
**********************************************************************
The graphviz dot diagram tool has malfunctioned and will be restarted.
The following is the log of the failure:
DOT <error console>: Warning: Unable to reclaim box space in spline routing for edge "node0" -> "node4". Something is probably seriously wrong.
DOT <error console>: dot(18364,0x7fff78102310) malloc: *** error for object 0x7fcd70e59d30: pointer being freed was not allocated
DOT <error console>: *** set a breakpoint in malloc_error_break to debug
DOT <error console>: /Users/pgiarrusso/bin/dot: line 2: 18364 Abort trap: 6 /usr/local/bin/dot "$@" 2> >( grep -v "CoreText performance note:" >&2 )
Cleanup: Last template: ilc.feature.base.TermBuilderSuite
Cleanup: Last dot input:
digraph G {
compound="true";
rankdir="TB";
node [margin="0.08,0.01", fontsize="10.00", style="filled", height="0.0", penwidth="1", shape="rectangle", width="0.0", fontname="Arial"];
edge [arrowsize="0.5", fontcolor="#aaaaaa", fontsize="10.00", color="#d4d4d4", fontname="Arial"];
subgraph clusterAll {
style="invis"
subgraph clusterOutgoing {
style="invis"
node5 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/class_diagram.png" /></TD><TD VALIGN="MIDDLE">org.scalautils.TripleEquals.Equalizer[TermBuilderSuite] </TD></TR></TABLE>>,fontcolor="#7d7d7d", color="#ababab", id="implicit-outgoing class|graph31_5", fillcolor="#e1e1e1", tooltip="ilc.feature.base.TermBuilderSuite can be implicitly converted to org.scalautils.TripleEquals.Equalizer[TermBuilderSuite] by the implicit method convertToEqualizer in trait org.scalautils.TripleEquals"];
node4 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/class_diagram.png" /></TD><TD VALIGN="MIDDLE">org.scalatest.Assertions.Equalizer[TermBuilderSuite] </TD></TR></TABLE>>,fontcolor="#7d7d7d", color="#ababab", id="implicit-outgoing class|graph31_4", fillcolor="#e1e1e1", tooltip="ilc.feature.base.TermBuilderSuite can be implicitly converted to org.scalatest.Assertions.Equalizer[TermBuilderSuite] by the implicit method convertToEqualizer in trait org.scalautils.TripleEquals"];
node4 -> node5 [constraint="false", style="invis", minlen="0.0"];
}
subgraph clusterThis {
style="invis"
node0 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/class_diagram.png" /></TD><TD VALIGN="MIDDLE">TermBuilderSuite </TD></TR></TABLE>>,fontcolor="#ffffff", URL="#inheritance-diagram", color="#115F3B", id="this class|graph31_0", fillcolor="#0A955B", tooltip="ilc.feature.base.TermBuilderSuite (this class)"];
}
node0 -> node4 [id="implicit-outgoing|0_4", tooltip="TermBuilderSuite can be implicitly converted to org.scalatest.Assertions.Equalizer[TermBuilderSuite], org.scalautils.TripleEquals.Equalizer[TermBuilderSuite]", constraint="false", minlen="2", ltail="clusterThis", lhead="clusterOutgoing", label="implicitly"];
}
node1 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/class_diagram.png" /></TD><TD VALIGN="MIDDLE">FunSuite </TD></TR></TABLE>>,fontcolor="#ffffff", color="#115F3B", id="class|graph31_1", fillcolor="#0A955B", tooltip="org.scalatest.FunSuite"];
node2 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/trait_diagram.png" /></TD><TD VALIGN="MIDDLE">Syntax </TD></TR></TABLE>>,fontcolor="#ffffff", color="#37657D", id="trait|graph31_2", fillcolor="#498AAD", tooltip="ilc.feature.base.Syntax"];
node3 [label=<<TABLE BORDER="0" CELLBORDER="0"><TR><TD><IMG SCALE="TRUE" SRC="/Users/pgiarrusso/Documents/Research/Sorgenti/ilc/scala-prototype/target/scala-2.10/test-api/lib/trait_diagram.png" /></TD><TD VALIGN="MIDDLE">functions.Syntax </TD></TR></TABLE>>,fontcolor="#ffffff", color="#37657D", id="trait|graph31_3", fillcolor="#498AAD", tooltip="ilc.feature.functions.Syntax"];
node1 -> node0 [id="inheritance|graph31_1_0", tooltip="TermBuilderSuite is a subtype of FunSuite", dir="back", arrowtail="empty"];
node2 -> node0 [id="inheritance|graph31_2_0", tooltip="TermBuilderSuite is a subtype of Syntax", dir="back", arrowtail="empty"];
node3 -> node0 [id="inheritance|graph31_3_0", tooltip="TermBuilderSuite is a subtype of functions.Syntax", dir="back", arrowtail="empty"];
}
Cleanup: Dot path: dot
Cleanup: Dot exit code: 134
**********************************************************************
Graphviz will be restarted...
Diagram generation running time breakdown:
diagrams model filtering
========================
count: 480 items
total time: 1 ms
average time: 0 ms
maximum time: 1 ms
diagrams model generation
=========================
count: 480 items
total time: 98 ms
average time: 0 ms
maximum time: 6 ms
dot diagram generation
======================
count: 136 items
total time: 84 ms
average time: 0 ms
maximum time: 18 ms
dot process runnning
====================
count: 136 items
total time: 3393 ms
average time: 24 ms
maximum time: 944 ms
svg processing
==============
count: 136 items
total time: 581 ms
average time: 4 ms
maximum time: 67 ms
Broken images: 786
Fixed images: 0
[info] Test Scala API documentation successful. [If I were on Linux, I could just run valgrind around graphviz and send a bug report to graphviz people — assuming the memory corruption is not OS X specific. But I don't have time for that.] |
@VladUreche said (edited on Feb 19, 2014 7:10:15 PM UTC): I tried that too -- the problem is that some of the build machines are quite slow, and package diagrams can easily take 10s to generate. Setting a timeout below 10s will prevent diagrams for large packages (arguably the most important ones). On the other hand, waiting 10 times 10 seconds (before scaladoc gives up generating diagrams) is too much. Tbh, knowing how much time went into fine-tuning this interaction with dot, I'd rather just live with the issue. [sorry for the inital post, pressed the wrong button] |
@VladUreche said: Yes, dot corrupts its heap after a number of diagrams on all platforms. I remember reporting a bug on their tracker, but it was quite hard to replicate. No idea if they fixed it in the meantime. |
@refried said: |
@refried said: How about: optimistically try in batch mode like it's done now; if there's stderr output, fall back to individual invocations, where you can check the return code. |
@refried said: |
@Blaisorblade said: I agree that would be an improvement. Yes, that's also a bit hacky, but less so than filtering the output, and given the alternatives I'd just go for it. I also proposed changing on all platforms, pending testing: bq. Now, since Arial's "Postscript" name seems to ArialMT, I wonder if the font name could be changed to ArialMT for all platforms. Could somebody with a Windows/Linux machine try the change? But I guess either change should technically work. Arya, I've seen your other comments, but currently this is the only harmless warning. |
@Blaisorblade said (edited on Aug 13, 2014 1:23:43 PM UTC): bq. I'd say I just don't have the signals necessary to coordinate with dot well enough. So I don't recommend waiting for that, but it would be cool if somebody competent could open a dot issue. For now picking a working font will have to do. |
can someone confirm if this ticket should remain open...? |
When running scaladoc with -diagrams on OS X 10.9 there are warnings printed to stderr of the dot process, and this is interpreted as a failure even though the process completes and produces the SVG.
The text was updated successfully, but these errors were encountered: