[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    [OpenJDK 2D-Dev] Bug in pisces Renderer (uninitialized crossings)
From:       mark () klomp ! org (Mark Wielaard)
Date:       2008-10-27 14:53:32
Message-ID: 1225119212.3329.29.camel () dijkstra ! wildebeest ! org
[Download RAW message or body]

Hi,

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
-------------- 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/attachment.bin 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic