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

ArrayIndexOutOfBoundsException in Marlin when scaleX is 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • jfx23
    • jfx11, jfx20, 10, jfx17, jfx21
    • javafx
    • b04
    • generic
    • generic

      Run the attached program and click Apply button. Following exception is observed.
      java.lang.ArrayIndexOutOfBoundsException: Index 17 out of bounds for length 17
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:903)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.goLeft(Dasher.java:909)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher$LengthIterator.initializeIterationOnCurve(Dasher.java:724)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher.skipSomethingTo(Dasher.java:627)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher.skipCurveTo(Dasher.java:1027)
      at javafx.graphics@21-internal/com.sun.marlin.Dasher.curveTo(Dasher.java:974)
      at javafx.graphics@21-internal/com.sun.marlin.TransformingPathConsumer2D$DeltaScaleFilter.curveTo(TransformingPathConsumer2D.java:291)
      at javafx.graphics@21-internal/com.sun.prism.impl.shape.DMarlinPrismUtils.feedConsumer(DMarlinPrismUtils.java:432)
      at javafx.graphics@21-internal/com.sun.prism.impl.shape.DMarlinPrismUtils.setupRenderer(DMarlinPrismUtils.java:314)
      at javafx.graphics@21-internal/com.sun.prism.impl.shape.DMarlinRasterizer.getMaskData(DMarlinRasterizer.java:89)
      at javafx.graphics@21-internal/com.sun.prism.impl.shape.ShapeUtil.rasterizeShape(ShapeUtil.java:52)
      at javafx.graphics@21-internal/com.sun.prism.impl.ps.BaseShaderGraphics.renderShape(BaseShaderGraphics.java:489)
      at javafx.graphics@21-internal/com.sun.prism.impl.ps.BaseShaderGraphics.drawEllipse(BaseShaderGraphics.java:1740)
      at javafx.graphics@21-internal/com.sun.prism.impl.shape.BasicEllipseRep.draw(BasicEllipseRep.java:47)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGShape.renderContent2D(NGShape.java:293)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGShape.renderContent(NGShape.java:261)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2074)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2074)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.renderForClip(NGNode.java:2315)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.renderRectClip(NGNode.java:2209)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.renderClip(NGNode.java:2235)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2068)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2074)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:579)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2074)
      at javafx.graphics@21-internal/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1966)
      at javafx.graphics@21-internal/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:480)
      at javafx.graphics@21-internal/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:321)
      at javafx.graphics@21-internal/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:92)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
      at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358)
      at javafx.graphics@21-internal/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
      at javafx.graphics@21-internal/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:126)
      at java.base/java.lang.Thread.run(Thread.java:1589)

      When this exception occurs, the javafx window becomes black (black_window.png). On moving the cursor, UI components gets shown again but they are not rendered properly (cursor_moved.png). In x64 based Mac the UI components gets re-rendered properly, whereas in M1 Mac rendering issue is observed. However exception is thrown in both the systems.

      The exception occurs on binding the slider valueProperty with Circle scaleX property. Same exception is observed if scaleY property is used for binding. This issue is not observed with other properties like translateXProperty.

        1. BindingException.java
          5 kB
        2. black_window.png
          black_window.png
          135 kB
        3. cursor_moved.png
          cursor_moved.png
          155 kB

            lbourges Laurent Bourgès
            kpk Karthik P K
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: