Bei einem Kollegen mit Mac OS als Betriebsystem und dem gleichen Quelltext führt das aber komischerweise nicht zum Fehler - werde Ihn mal fragen was Math.log(0) bei Ihm liefert :)
Hier meine Fehlerbeschreibung:
Summary: endless loop in LogAxis class
Description:
JFreeChart Version 1.0.12
OS: Linux (Kernel: 2.6.27-14)
JVM: sun-java 1.6.0_10-b33
Architecture: x86_64
I get an endless loop in LogAxis.refreshTicksVertical method. This method
calls calculateLog(getLowerBound())-method. getLowerBound() returns 0.0d
and calculateLog calls Math.log on number 0. the result of Math.log(0) =
-Infinity on my system and this is the cause of the endless loop in
LogAxis.refreshTicksVertical - while (current <= end) -
current = -Infinity - is every time true.
I have added a zero (0) check to calculateLog and now everything seems to
work.
A colleague with Mac OS operating system does not have the problem with
the same code.
The class LogarithmicAxis seems to work out of the box - seems to have a
zero check already included (SMALL_LOG_VALUE = 1e-100).
Hier der Link zum Ticket bei sourceforge: link
Update: auf dem Mac gibt Math.log(0) auch -Infitity.
Keine Kommentare:
Kommentar veröffentlichen