https://issues.apache.org/bugzilla/show_bug.cgi?id=49216

--- Comment #2 from Thomas Deweese <[email protected]> 2010-04-29 05:58:54 EDT 
---
(In reply to comment #0)
> I'm using the Transcoder API to rasterize an SVG into JPEG.  I'm getting the
> following NPE, followed by a complete crash of the Java VM (there's two stack
> traces here - I'm not sure if it happened twice on two separate images or if
> these are related somehow):

   I think it must be a side effect of running out of memory. I'm not
sure why an OOM exeception isn't thrown.


> java.lang.NullPointerException
>     at java.awt.image.DataBufferInt.getBankData(DataBufferInt.java:162)
>     at
> org.apache.batik.ext.awt.image.rendered.PadRed$ZeroRecter_INT_PACK.<init>(PadRed.java:156)
>     at
> org.apache.batik.ext.awt.image.rendered.PadRed$ZeroRecter.getZeroRecter(PadRed.java:123)
>     at
> org.apache.batik.ext.awt.image.rendered.PadRed.handleZero(PadRed.java:193)
>     at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:92)
>     at
> org.apache.batik.ext.awt.image.rendered.ColorMatrixRed.copyData(ColorMatrixRed.java:116)
>     at
> org.apache.batik.ext.awt.image.rendered.FormatRed.copyData(FormatRed.java:116)
>     at
> org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:526)

    The Writable Raster who's DataBuffer is 'bad' is allocated a few lines
before this.  And that Raster is just passed down to the point where getting
the DataBuffer's data bank causes the NPE.

    If you are looking to rasterize large documents you would be much better
off using the TiledImageTranscoder (contrib/tiledTranscoder) which uses
Tiff for the output and renders the image in strips to greatly reduce memory
consumption.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to