United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7049339 Sun2D: Batik: Printing: java.awt.image.RasterFormatException: (x + width) is outside raster
JDK-7049339 : Sun2D: Batik: Printing: java.awt.image.RasterFormatException: (x + width) is outside raster

Details
Type:
Bug
Submit Date:
2011-05-27
Status:
Closed
Updated Date:
2013-05-22
Project Name:
JDK
Resolved Date:
2011-09-16
Component:
client-libs
OS:
generic,windows_xp
Sub-Component:
2d
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description
* SUMMARY
May be logic error in Batik, but when using Sun2D, printing one of the examples yeilds a RasterFormatException. The exception looks like it's part of standard parameter checking in src/share/classes/java/awt/image/Raster.java.

* STEPS TO REPRODUCE
1. Download the "binary distribution" from <http://xmlgraphics.apache.org/batik/download.cgi>
2. java -jar batik-squiggle.jar
3. File -> Open File??? -> samples/batikBatik.svg
4. File -> Print??? -> OK -> Preview

* RESULTS
java.awt.image.RasterFormatException: (x + width) is outside raster
	at sun.awt.image.IntegerInterleavedRaster.createWritableChild(IntegerInterleavedRaster.java:465)
	at sun.awt.image.IntegerInterleavedRaster.createChild(IntegerInterleavedRaster.java:516)
	at sun.java2d.loops.Blit$AnyBlit.Blit(Blit.java:157)
	at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:927)
	at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:550)
	at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:54)
	at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:982)
	at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:168)
	at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3261)
	at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3246)
	at sun.print.PeekGraphics.drawImage(PeekGraphics.java:952)
	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:361)
	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455)
	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(PadRable8Bit.java:135)
	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440)
	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(PadRable8Bit.java:135)
	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440)
	at org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRable(FilterChainRable8Bit.java:251)
	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440)
	at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549)
	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
	at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
	at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
	at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(CanvasGraphicsNode.java:159)
	at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
	at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
	at org.apache.batik.transcoder.print.PrintTranscoder.print(PrintTranscoder.java:348)
	at apple.awt.CPrinterJob$6.run(CPrinterJob.java:619)
	at apple.awt.CPrinterJob.printAndGetPageFormatArea(CPrinterJob.java:629)
	at apple.awt.CPrinterJob.printLoop(Native Method)
	at apple.awt.CPrinterJob.print(CPrinterJob.java:225)
	at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1251)
	at org.apache.batik.transcoder.print.PrintTranscoder.print(PrintTranscoder.java:267)
	at org.apache.batik.apps.svgbrowser.JSVGViewerFrame$10.run(JSVGViewerFrame.java:1560)

Tested on both 1.5 and 1.6.

                                    

Comments
EVALUATION

Contributed fix :
http://mail.openjdk.java.net/pipermail/2d-dev/2011-June/002071.html
                                     
2011-06-24



Hardware and Software, Engineered to Work Together