JDK-7049339 : Sun2D: Batik: Printing: java.awt.image.RasterFormatException: (x + width) is outside raster
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2011-05-27
  • Updated: 2013-05-22
  • Resolved: 2011-09-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b01Fixed
Related Reports
Duplicate :  
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
24-06-2011