Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1582032 - OpenJDK8 ArrayIndexOutOfBoundsException at sun.java2d.pisces.Dasher.goTo(Dasher.java:151)
OpenJDK8 ArrayIndexOutOfBoundsException at sun.java2d.pisces.Dasher.goTo(Dash...
Status: VERIFIED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.8.0-openjdk (Show other bugs)
7.4
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Andrew John Hughes
zzambers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-23 22:48 EDT by kazuhiro kawana
Modified: 2018-07-10 10:47 EDT (History)
4 users (show)

See Also:
Fixed In Version: java-1.8.0-openjdk-1.8.0.181-4.b04.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Icedtea Bugzilla 3602 None None None 2018-06-26 22:35 EDT
openjdk bug system JDK-8075942 None None None 2018-05-23 22:48 EDT

  None (edit)
Description kazuhiro kawana 2018-05-23 22:48:33 EDT
### Description of problem:
We could not transcode from SVG to JPG using “apache batik svg toolkit” and OpenJDK8.

A same issue was reported in JDK bug database and already fixed:

https://bugs.openjdk.java.net/browse/JDK-8075942
http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/5b07559a4547

I checked source code in src rpm, it looks OpenJDK 8(latest) does not contain the above fix. Please a backport the fix.


### Version-Release number of selected component (if applicable):
— java-1.8.0-openjdk-1.8.0.77-0.b03.el7_2.x86_64
— batik-bin-1.9 (You can download from http://ftp.jaist.ac.jp/pub/apache/xmlgraphics/batik/binaries/)


### How reproducible:

Anytime


### Steps to Reproduce:
1: Install latest openjdk 8 : 

I installed java-1.8.0-openjdk-1.8.0.77-0.b03.el7_2.

2: Download/unzip apache batik :

I downloaded/unzip batik-bin-1.9.zip.

3: Comple sample code “SaveAsJPEG.java” :

Ex)
$javac -classpath batik-1.9/batik-1.9.jar SaveAsJPEG.java

5: Execute sample code “SaveAsJPEG.java” and Transcode sample svg file “NG.svg” :

$ java -cp .:batik-1.9/batik-1.9.jar -Djava.awt.headless=true SaveAsJPEG NG.svg NG.jpg 400 200

*** I attached sample code/svg files this bug. Please check it. ***


### Actual results:

# java -cp .:batik-1.9/batik-1.9.jar -Djava.awt.headless=true SaveAsJPEG NG.svg NG.jpg 400 200
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
null
    at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:132)
    at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
    at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
    at SaveAsJPEG.main(SaveAsJPEG.java:40)
Caused by the underlying exception: java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at sun.java2d.pisces.Dasher.goTo(Dasher.java:151)
    at sun.java2d.pisces.Dasher.lineTo(Dasher.java:188)
    at sun.java2d.pipe.RenderingEngine.feedConsumer(RenderingEngine.java:366)
    at sun.java2d.pisces.PiscesRenderingEngine.pathTo(PiscesRenderingEngine.java:484)
    at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:363)
    at sun.java2d.pisces.PiscesRenderingEngine.createStrokedShape(PiscesRenderingEngine.java:69)
    at java.awt.BasicStroke.createStrokedShape(BasicStroke.java:301)
    at org.apache.batik.gvt.StrokeShapePainter.getPaintedArea(StrokeShapePainter.java:125)
    at org.apache.batik.gvt.StrokeShapePainter.getPaintedBounds2D(StrokeShapePainter.java:134)
    at org.apache.batik.gvt.CompositeShapePainter.getPaintedBounds2D(CompositeShapePainter.java:156)
    at org.apache.batik.gvt.ShapeNode.getPrimitiveBounds(ShapeNode.java:238)
    at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(AbstractGraphicsNode.java:854)
    at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:820)
    at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(CompositeGraphicsNode.java:224)
    at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(CompositeGraphicsNode.java:295)
    at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:820)
    at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(CompositeGraphicsNode.java:207)
    at org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.getBounds2D(GraphicsNodeRable8Bit.java:156)
    at org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.createRendering(GraphicsNodeRable8Bit.java:261)
    at org.apache.batik.gvt.renderer.StaticRenderer.renderGNR(StaticRenderer.java:481)
    at org.apache.batik.gvt.renderer.StaticRenderer.updateWorkingBuffers(StaticRenderer.java:508)
    at org.apache.batik.gvt.renderer.StaticRenderer.repaint(StaticRenderer.java:375)
    at org.apache.batik.gvt.renderer.StaticRenderer.repaint(StaticRenderer.java:344)
    at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:111)
    at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
    at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
    at SaveAsJPEG.main(SaveAsJPEG.java:40)

### Expected results:

We expect to convert svg file to jpeg file without java.lang.ArrayIndexOutOfBoundsException.
Comment 3 kazuhiro kawana 2018-05-23 23:11:08 EDT
Note:

OpenJDK version miss..
### Version-Release number of selected component (if applicable):
— java-1.8.0-openjdk-1.8.0.77-0.b03.el7_2.x86_64
— batik-bin-1.9 (You can download from http://ftp.jaist.ac.jp/pub/apache/xmlgraphics/batik/binaries/)

--->

Correct version is:
### Version-Release number of selected component (if applicable):
— java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64
— batik-bin-1.9 (You can download from http://ftp.jaist.ac.jp/pub/apache/xmlgraphics/batik/binaries/)
Comment 4 kazuhiro kawana 2018-05-23 23:13:20 EDT
### Additional Info:

The customer could reproduce this issue using openJDK1.8.0.151.

Note You need to log in before you can comment on or make changes to this bug.