Menu

#136 ZGRViewer 0.9.0 stackoverflow, when zooming out if style="dotted"

None
open
None
1
2014-09-24
2014-09-10
Anonymous
No

When I am loading my dot file and zooming out I get a EXECTION STACK OVERFLOW.
Both with JRE 1.7.0_65-b20 and 1.8.0_20-b26 on windows 7.

The error happens when zooming out by PgUp or mouse wheel.
Some times it happens first time I press PgUp some times 2nd or 3rd time.

If I remove all style="dotted" in my dot file the error does not happen.

I have attached my dot file.

Dot.exe version 2.38

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2014-09-10

    Here you also have the error report from java

     
  • Emmanuel Pietriga

    I was able to reproduce the problem with a JVM 1.7.0_5 on Mac OS X 10.9. Unfortunately, the problem seems to be coming from Java2D's GeneralPath drawing method when a dashed stroke is set on it. I'm not sure I can do anything about it at this point.

     
  • Emmanuel Pietriga

    Note: I tried changing the DPath (spline) drawing strategy, using a sequence of QdCurve/CbCurve drawing instructions instead of a a single GeneralPath drawing instruction, but the problem is the same. No workaround here.

     
  • Emmanuel Pietriga

    Do you have an easy way to generate the same type of graph, but with a much smaller number of edges ? Just to check if this is a problem of scalability of type of stroke involved.

     
  • Kasper Broegaard Simonsen

    Thank you for your response.

    If I reduce the graph to the following java still crashes:

    digraph LiveGraph { 
      407
      408
      407->408 [style="dotted"];
    }
    
     

    Last edit: Kasper Broegaard Simonsen 2014-09-23
  • Emmanuel Pietriga

    I confirm. The problem also happens with style="dashed". I suppose it happens with any stroke other than "solid", actually. That would seem to be a problem with Java2D when setting a scale AffineTransform that makes the object on which the stroke is applied very small. I'm going to try to work around it.

     
  • Emmanuel Pietriga

    • assigned_to: Emmanuel Pietriga
     
  • Emmanuel Pietriga

    It is not easy to work around this in a generic manner. The only way I found so far is to prevent assigning a BasicStroke to the Graphics2D if the AffineTransform's scale factor is smaller than approx. 0.05. And that's actually probably more a conjunction of the BasicStroke pattern used and scale factor. The only workaround I see for now is to add a parameter to ZVTM's DPath, so that the GeneralPath gets painted with the stroke set only if the Graphics2D's scale is higher than this parameter value. But that solution is pretty ugly. And I can't think of a nice way to expose this all the way down to ZGRViewer in a user-friendly manner.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB