java.lang.IllegalArgumentException: Requires xLow < xHigh.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
snid3ly
Posts: 23
Joined: Wed Aug 07, 2013 4:21 am
antibot: No, of course not.

java.lang.IllegalArgumentException: Requires xLow < xHigh.

Post by snid3ly » Wed Aug 21, 2013 6:39 pm

I got the following exception while clicking around on my chart.

Code: Select all

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Requires xLow < xHigh.
	at org.jfree.chart.renderer.RendererUtilities.findLiveItemsLowerBound(RendererUtilities.java:77)
	at org.jfree.chart.renderer.RendererUtilities.findLiveItems(RendererUtilities.java:260)
	at org.jfree.chart.plot.XYPlot.render(XYPlot.java:3767)
	at org.jfree.chart.plot.XYPlot.draw(XYPlot.java:3303)
	at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1226)
	at org.jfree.chart.ChartPanel.paintComponent(ChartPanel.java:1607)
	at javax.swing.JComponent.paint(JComponent.java:1054)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5221)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1508)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1439)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1236)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5169)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4980)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
	at javax.swing.RepaintManager$3.run(RepaintManager.java:784)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706)
	at javax.swing.RepaintManager.access$1000(RepaintManager.java:62)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1647)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: java.lang.IllegalArgumentException: Requires xLow < xHig

Post by david.gilbert » Thu Aug 29, 2013 8:36 pm

I'd like to figure out how this happens. I don't have much to go on, but looking through the code it seems that the most likely state to trigger this is where the axis range has zero length (lower bound == upper bound). Are you able to reproduce this on one of the JFreeChart demos? Is there anything particular in your "clicking around"?
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

snid3ly
Posts: 23
Joined: Wed Aug 07, 2013 4:21 am
antibot: No, of course not.

Re: java.lang.IllegalArgumentException: Requires xLow < xHig

Post by snid3ly » Thu Oct 17, 2013 7:30 pm

Sorry for the late reply. I can reproduce it on my own chart. I am not sure if it will happen on any of the demos. I just click on the chart and drag down and to the right to draw a box on the chart. This zooms in as it should. I keep zooming in this way until I get the exception. I can package up what I have and give you a link if you want to check it out.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: java.lang.IllegalArgumentException: Requires xLow < xHig

Post by david.gilbert » Fri Oct 18, 2013 8:45 am

Are you using a DateAxis? There is an issue with this when you zoom in all the way down to a single millisecond, I put in this fix in the 1.0.16 release:

http://sourceforge.net/p/jfreechart/code/2910/

Well, if you are already using 1.0.16 then I guess it isn't really a fix.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

snid3ly
Posts: 23
Joined: Wed Aug 07, 2013 4:21 am
antibot: No, of course not.

Re: java.lang.IllegalArgumentException: Requires xLow < xHig

Post by snid3ly » Sun Nov 03, 2013 12:13 am

I switched to the current version and that fixed it. thanks!

Locked