Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8089667

Setting a dash length on a Shape that is too small can cause a hang

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • None

      In investigating RT-36296 where CSS attributes were being used to set a dash on a zero width line we discovered that the same problem can be caused when setting a very small dash on a wider line (the CSS code calculates dashes relative to the stroke width so a zero width line causes them to calculate such small dashes).

      The first webrev for fixing that bug included code that modified the dashing engine to deal with dash patterns where no dash length was long enough to change a segment length through subtraction and it worked fine for that case, but dash lengths that are just large enough to be subtracted from a segment length would still cause long runtimes and an ArrayIndexOutOfBounds exception later in the rasterizer code. As a result, the fix for that bug only fixed the CSS calculations and did not include fixes for the internal dashing engine until all cases could be investigated and fixed (via this issue).

      The test case from that bug report that tested non-CSS dashing is attached here.

            Unassigned Unassigned
            flar Jim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported: