Using ODROID C2 here aswell. I upgraded OpenHAB from 2.0 to 2.1 which caused the Charts to get messed up. Reinstalling all the font related stuff didn’t help.
Dou you still have the files from your OH1 installation? FIre that thing back up and see if the charts are working properly there. You could also try to go back to OH2.0 and see if it’s working for you with that. Please report back your findings.
Maybe @Kai could give some advice on how to debug that? I’ve turned TRACE Logging on but other than my console getting flooded by Messages that are completely unrelated I didn’t get any sign of the issue. As it was working on 2.0 and now on 2.1 it’s not working anymore it would also be possible to look at the changes that happened there on the charting system.
The only change that I found on the ChartServlet since 2.0 is this one. So maybe the upgrade to Xchart 2.6.1 is the culprit? Maybe you can check on their issue tracker whether any such problems are known to them.
Just for the fun of it, I ran the XChart demo jar on my UBUNTU (odroid C2) to see if Kai’s suspect points to the direction that XChart is the problem. I could only find a much higher version 3.5 on http://knowm.org/open-source/xchart/, so its not really a comparable result. OH2 obviously uses 2.6.x as Kai indicates.
The 3.5. XChart demo runs flawless, the outcoming pictures are all fine.
Also I thinks there is no dependency to any internal OS fonts as outlined in the first post. Xchart does not depend on any external fonts - at least not the latest 3.5.
If you checked wether the issue exists in 2.6.x, XChart should be upgraded in OpenHAB. I’m wondering why it was not already done but Version 2.6.x was chosen, maybe @Kai can give us an explanation on that.
Yeah I’ve read that aswell, seems a little weird to me to do such a thing. I’m just waiting for @3edc to check if the issue indeed occurs on his setup when using the 2.6.x version, then I will publish a PR (unless @3edc wants to do that, it’s your work so if you want to take credit for it I won’t do anything and just wait).
Hi all,
ok, here is the final result: XChart is to blame !
In more detail: XChart on an ARM- JVM.
So I must correct my above posting. I’ve tried both XChart 2.6.1 and latest 3.5.0, both have the same problems on an ODROID C2. Running the same jars e.g. on WINDOWS produces perfect results.
My java version:
"1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)_
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode))_
So thanks to @Kai for pointing to that direction. OH2 is released from any accusations !
What now ?
I’ll try to build the XChart lib on the ODROID and then see what is the outcome.
Also I’ll open an issue on the XCharts project. But I do not expect much outcome. The problem is somewhere between ODROID, the JVM there and … whatever.
Could somebody with another ARM platform (e.g. a RASPBERRY) perhaps test these two jars and post the results ?
I found the issue in the XChart Library and created an issue over there and pointed directly to the lines causing these problems. Hopefully someone understands what’s happening there, I don’t do be honest. They are using a weird way of transforming letters into a shape and filling that, and that just fails on the C2. Before that it was a simple draw function which just worked.
Just a little Update from me: There’s nothing really new, I’ve tried to figure out why it’s causing issues but I haven’t really found a cause. It would be possible for us to downgrade, that would solve the issue for us, at least for now.
Any news on this issue? It seems there is no change in the XChart lib so atm the chart implementation is broken in openhab 2. Perhaps you should switch to another lib?
As @Kai closed the github issue, nobody is working on it. I proposed a downgrade and received no answer. In my opinion OpenHAB is not maintained very well as Issues that are still existing are closed, proposals are not answered and overall nobody seems to care about the issues that are existing.
Are you also using an Odroid C2 or is the issue also affecting other Hardware?
Maybe. I just checked the java shipped with the pine64 openhab image. It isn’t working because of an NPE. So the oracle java is a better solution. At least the chart shows something and not a broken image
You could give 32 Bit java a try, maybe that’s a workaround. Even though it’s not acceptable at all to ignore such an issue. A downgrade of XChart would fix it.
So I guess it’s on oracle now to work on this issue, it would still be nice to downgrade XChart to fix this. There was absolutely no point in upgrading that library.