Red Hat Bugzilla – Bug 662230
Last modified: 2011-05-03 13:37:13 EDT
Description of problem:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 255
Version-Release number of selected component (if applicable):
run applet at http://saturnids.spicenet.net/sonario/develop081125/develop081125-mysql.html , go to org chart and try to save graph to file.
Exception is thrown and the image is not saved properly.
The image of a graph should be saved.
This is what I've found so far:
The bug happens because of indexed images are used, and has nothing
to do with the png encoders. What's happening is that, when the plugin
tries to draw some shapes to a buffered image that uses an indexed color
model. After some operations, one of the entries in image.raster.data
becomes -1, which is not a valid value because the particular color model
used supports indeces up to 27 only. This does not cause an
error as soon as it happens, but does so only when in encodePass, where
the colour index is used as an index into an array of length 28 and the
exception is thrown. So, the bug is in one of the rendering loops, not
in the png encoders. Unfortunately, the problematic loop (MaskFill)
is a native loop, which does not make debugging easy.
Bug should not be closed until the RPM is available in rawhide.
Fixed in head and 1.10 by this changeset: