Is there anyway to disable this exception which is thrown sometimes?
sun.dc.pr.PRException: endPath: bad path
at sun.dc.pr.Rasterizer.endPath(Rasterizer.java:537)
at sun.java2d.pipe.DuctusRenderer.createShapeRasterizer(DuctusRenderer.java:374)
at sun.java2d.pipe.DuctusShapeRenderer.renderPath(DuctusShapeRenderer.java:57)
at sun.java2d.pipe.DuctusShapeRenderer.fill(DuctusShapeRenderer.java:49)
at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2210)
at org.jfree.chart.renderer.XYBarRenderer.drawItem(Unknown Source)
at org.jfree.chart.plot.XYPlot.render(Unknown Source)
at org.jfree.chart.plot.XYPlot.draw(Unknown Source)
at org.jfree.chart.JFreeChart.draw(Unknown Source)
at org.jfree.chart.ChartPanel.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(JComponent.java:808)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4771)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4724)
at javax.swing.JComponent._paintImmediately(JComponent.java:4668)
at javax.swing.JComponent.paintImmediately(JComponent.java:4477)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
I know I try to draw an empty timeline but that's an option too. Why to throw an exception?
bad path
RE: bad path
I've seen this exception with datasets that contain null values. It seems to be generated inside Sun's code but the exception is not thrown back to JFreeChart (I added a try{..}catch{..} block in JFreeChart but the exception never got there
).
In order to overcome this, I added some fixes to XYBarRenderer and StandardXYItemRenderer that exit when null or NaN values are detected. I checked this code into cvs today. You may want to test with these fixes to see if it solves your problem.

In order to overcome this, I added some fixes to XYBarRenderer and StandardXYItemRenderer that exit when null or NaN values are detected. I checked this code into cvs today. You may want to test with these fixes to see if it solves your problem.