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

Mark Wielaard mark at klomp.org
Mon Oct 27 14:53:32 UTC 2008


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):
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

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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: icedtea-renderer-crossing.patch
Type: text/x-patch
Size: 765 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20081027/671623c5/icedtea-renderer-crossing.patch>

More information about the 2d-dev mailing list