From: SourceForge.net <no...@so...> - 2011-09-27 19:16:08
|
Bugs item #3406590, was opened at 2011-09-08 22:39 Message generated for change (Settings changed) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=3406590&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None >Group: 1.0.x >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Darren Hiebert (dhiebert) >Assigned to: David Gilbert (mungady) Summary: Exception due to apparent race condition Initial Comment: There appears to be a race condition in JFreeChart, as I keep seeing an exception thrown that seems impossible to have happened unless the values changed between the throwing of the exception and the assembling of the exception string. Here is the exception trace: Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 1, Size: 3 at java.util.ArrayList.rangeCheck(ArrayList.java:604) at java.util.ArrayList.get(ArrayList.java:382) at org.jfree.data.ComparableObjectSeries.getDataItem(ComparableObjectSeries.java:332) at org.jfree.data.xy.XYIntervalSeries.getDataItem(XYIntervalSeries.java:189) at org.jfree.data.xy.XYIntervalSeries.getYValue(XYIntervalSeries.java:147) at org.jfree.data.xy.XYIntervalSeriesCollection.getYValue(XYIntervalSeriesCollection.java:199) at org.jfree.chart.renderer.xy.XYBarRenderer.drawItem(XYBarRenderer.java:943) at org.jfree.chart.plot.XYPlot.render(XYPlot.java:3738) at org.jfree.chart.plot.XYPlot.draw(XYPlot.java:3310) at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1235) at org.jfree.chart.ChartPanel.paintComponent(ChartPanel.java:1668) at javax.swing.JComponent.paint(JComponent.java:1054) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5221) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1482) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1413) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:311) at javax.swing.RepaintManager.paint(RepaintManager.java:1206) at javax.swing.JComponent._paintImmediately(JComponent.java:5169) at javax.swing.JComponent.paintImmediately(JComponent.java:4980) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:770) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677) at javax.swing.RepaintManager.access$700(RepaintManager.java:59) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705) at java.awt.EventQueue.access$000(EventQueue.java:101) at java.awt.EventQueue$3.run(EventQueue.java:666) at java.awt.EventQueue$3.run(EventQueue.java:664) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:675) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) ---------------------------------------------------------------------- >Comment By: David Gilbert (mungady) Date: 2011-09-27 19:16 Message: My guess is that you are updating a dataset outside of the EDT and, simultaneously, JFreeChart is redrawing the chart via the ChartPanel.paintComponent() method. JFreeChart is not thread-safe - you should make all dataset updates on the EDT for Swing apps. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=3406590&group_id=15494 |