[OpenJDK 2D-Dev] Bug in pisces Renderer (uninitialized crossings)

Mark Wielaard mark at klomp.org
Tue Nov 4 09:30:09 UTC 2008


Hi,

If anybody would take a look at this fix that would be appreciated.

Thanks,

Mark

On Mon, 2008-10-27 at 15:53 +0100, Mark Wielaard wrote:
> There is a bug in the pisces Renderer in crossingListFinished(). Both
> crossings and crossingIndices might not have been initialized, so have
> to be checked for being null. They only get initialized if
> setCrossingsExtents() was called earlier, which might not always be the
> case when crossingListFinished() is called from _endRendering().
> 
> You can see this with for example this applet (you will need to have the
> IcedTeaPlugin installed):
> http://www.jroller.com/dgilbert/entry/jfreechart_and_jxlayer
> The magnifying glass will not work, and you will get an exception:
> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
>   at sun.java2d.pisces.Renderer.crossingListFinished(Renderer.java:778)
>   at sun.java2d.pisces.Renderer._endRendering(Renderer.java:466)
>   at sun.java2d.pisces.Renderer.endRendering(Renderer.java:478)
>   at sun.java2d.pisces.PiscesRenderingEngine.getAATileGenerator(PiscesRenderingEngine.java:327)
>   at sun.java2d.pipe.AAShapePipe.renderPath(AAShapePipe.java:93)
>   at sun.java2d.pipe.AAShapePipe.fill(AAShapePipe.java:65)
>   at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:160)
>   at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2422)
>   at org.jfree.chart.plot.Plot.fillBackground(Plot.java:1021)
> [...]
> 
> Attached is the workaround that I checked into IcedTea to make this work
> reliably:
> 
> 2008-10-27  Mark Wielaard  <mark at klomp.org>
> 
>         * patches/icedtea-renderer-crossing.patch: New patch.
>         * Makefile.am (ICEDTEA_PATCHES): Add new patch.
>         * HACKING: Document new patch.
> 
> Cheers,
> 
> Mark




More information about the 2d-dev mailing list