-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b65
-
x86_64
-
linux_ubuntu
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084894 | emb-9 | Philip Race | P4 | Resolved | Fixed | team |
JDK-8208979 | 8u201 | Philip Race | P4 | Resolved | Fixed | b01 |
JDK-8206481 | 8u192 | Philip Race | P4 | Resolved | Fixed | b02 |
JDK-8216881 | emb-8u201 | Philip Race | P4 | Resolved | Fixed | master |
FULL PRODUCT VERSION :
openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
OpenJDK 64-Bit Server VM (build 25.40-b08, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux znf274 3.7.0-999-generic #201211070425 SMP Wed Nov 7 09:25:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Graphics2D.draw(Shape) throws java.lang.InternalError for some shapes caused by ArrayIndexOutOfBoundsException at sun.java2d.pisces.Dasher.goTo()
REGRESSION. Last worked in version 6u45
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac Test2.java
java Test2
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Normal exit
ACTUAL -
throws exception
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.lang.InternalError: Unable to Stroke shape (null)
at sun.java2d.pipe.LoopPipe.getStrokeSpans(LoopPipe.java:285)
at sun.java2d.pipe.LoopPipe.draw(LoopPipe.java:201)
at sun.java2d.pipe.PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:148)
at sun.java2d.pipe.ValidatePipe.draw(ValidatePipe.java:154)
at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2497)
at Test2.main(Test2.java:33)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at sun.java2d.pisces.Dasher.goTo(Dasher.java:151)
at sun.java2d.pisces.Dasher.somethingTo(Dasher.java:244)
at sun.java2d.pisces.Dasher.quadTo(Dasher.java:548)
at sun.java2d.pipe.RenderingEngine.feedConsumer(RenderingEngine.java:369)
at sun.java2d.pisces.PiscesRenderingEngine.pathTo(PiscesRenderingEngine.java:484)
at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:363)
at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:163)
at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:142)
at sun.java2d.pipe.LoopPipe.getStrokeSpans(LoopPipe.java:278)
... 5 more
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Stroke;
import java.awt.geom.GeneralPath;
import java.awt.image.BufferedImage;
public class Test2
{
public static void main(String[] args)
{
GeneralPath shape = new GeneralPath();
int[] pointTypes = {0, 0, 1, 1, 0, 1, 1, 0};
double[] xpoints = {428, 420, 400, 400, 400, 400, 420, 733};
double[] ypoints = {180, 180, 180, 160, 30, 10, 10, 10};
shape.moveTo( xpoints[0], ypoints[0] );
for( int i = 1; i < pointTypes.length; i++ )
{
if( pointTypes[i] == 1 && i < pointTypes.length - 1 )
shape.quadTo( xpoints[i], ypoints[i], xpoints[i + 1], ypoints[i + 1] );
else
shape.lineTo( xpoints[i], ypoints[i] );
}
BufferedImage image = new BufferedImage(1000, 1000, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics();
Color color = new Color( 124, 0, 124, 255 );
g2.setColor(color);
Stroke stroke = new BasicStroke( 1.0f, 0, 0, 10.0f, new float[] {9, 6}, 0.0f );
g2.setStroke(stroke);
g2.draw(shape);
}
}
---------- END SOURCE ----------
openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b04)
OpenJDK 64-Bit Server VM (build 25.40-b08, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux znf274 3.7.0-999-generic #201211070425 SMP Wed Nov 7 09:25:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Graphics2D.draw(Shape) throws java.lang.InternalError for some shapes caused by ArrayIndexOutOfBoundsException at sun.java2d.pisces.Dasher.goTo()
REGRESSION. Last worked in version 6u45
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac Test2.java
java Test2
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Normal exit
ACTUAL -
throws exception
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "main" java.lang.InternalError: Unable to Stroke shape (null)
at sun.java2d.pipe.LoopPipe.getStrokeSpans(LoopPipe.java:285)
at sun.java2d.pipe.LoopPipe.draw(LoopPipe.java:201)
at sun.java2d.pipe.PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:148)
at sun.java2d.pipe.ValidatePipe.draw(ValidatePipe.java:154)
at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2497)
at Test2.main(Test2.java:33)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at sun.java2d.pisces.Dasher.goTo(Dasher.java:151)
at sun.java2d.pisces.Dasher.somethingTo(Dasher.java:244)
at sun.java2d.pisces.Dasher.quadTo(Dasher.java:548)
at sun.java2d.pipe.RenderingEngine.feedConsumer(RenderingEngine.java:369)
at sun.java2d.pisces.PiscesRenderingEngine.pathTo(PiscesRenderingEngine.java:484)
at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:363)
at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:163)
at sun.java2d.pisces.PiscesRenderingEngine.strokeTo(PiscesRenderingEngine.java:142)
at sun.java2d.pipe.LoopPipe.getStrokeSpans(LoopPipe.java:278)
... 5 more
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Stroke;
import java.awt.geom.GeneralPath;
import java.awt.image.BufferedImage;
public class Test2
{
public static void main(String[] args)
{
GeneralPath shape = new GeneralPath();
int[] pointTypes = {0, 0, 1, 1, 0, 1, 1, 0};
double[] xpoints = {428, 420, 400, 400, 400, 400, 420, 733};
double[] ypoints = {180, 180, 180, 160, 30, 10, 10, 10};
shape.moveTo( xpoints[0], ypoints[0] );
for( int i = 1; i < pointTypes.length; i++ )
{
if( pointTypes[i] == 1 && i < pointTypes.length - 1 )
shape.quadTo( xpoints[i], ypoints[i], xpoints[i + 1], ypoints[i + 1] );
else
shape.lineTo( xpoints[i], ypoints[i] );
}
BufferedImage image = new BufferedImage(1000, 1000, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics();
Color color = new Color( 124, 0, 124, 255 );
g2.setColor(color);
Stroke stroke = new BasicStroke( 1.0f, 0, 0, 10.0f, new float[] {9, 6}, 0.0f );
g2.setStroke(stroke);
g2.draw(shape);
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8084894 ArrayIndexOutOfBoundsException at sun.java2d.pisces.Dasher.goTo(Dasher.java:151)
-
- Resolved
-
-
JDK-8206481 ArrayIndexOutOfBoundsException at sun.java2d.pisces.Dasher.goTo(Dasher.java:151)
-
- Resolved
-
-
JDK-8208979 ArrayIndexOutOfBoundsException at sun.java2d.pisces.Dasher.goTo(Dasher.java:151)
-
- Resolved
-
-
JDK-8216881 ArrayIndexOutOfBoundsException at sun.java2d.pisces.Dasher.goTo(Dasher.java:151)
-
- Resolved
-
- relates to
-
JDK-8080932 [TEST_BUG] Test java/awt/BasicStroke/DashStrokeTest.java fails with Bad script error due to improper @run notation
-
- Resolved
-