OH2.1: Fonts Scrambled

I upgraded my Debian Based OpenHAB Installation to 2.1 and since then the graphs are messed up. I opened a Bug on Github but Kai thinks this is related to a font issue on my system. The chart looks like this, I’ve already tried rebuilding the font cache and doing a
apt-get install --reinstall --purge fontconfig fontconfig-config
That didn’t help.


Same problem here and also no solution.

Here are my screenshots : [Chart axis labeling spoiled after upgrade from OH1 to OH2]

Also in that posting Kai mentioned that it is an OS font problem, but this appeared after upgrading from OH1 to OH2 while no OS upgrade took place.So that’s not really true.

I’m using UBUNTU 16 on an ODROID C2.


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.

I had the same issue: Charts in OH 2.1 are blurred and CPU very high
Also using an ODROID C2.


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.

Still no remedy at all.

Great that you already have tried that, I wanted to try that today. Older releases can be found on github, see here https://github.com/timmolter/XChart/releases?after=xchart-3.0.3

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.

Well, I can only just read what has been written in the commit of @watou at the time:

“3.x was not used due to increased size without benefit and refactoring.”

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:

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 ! :wink:

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 ?

Here are the jars: Link


Didn’t you say that the newest version was working fine?

Also ARM is not ARM, there’s 64 Bit ARM and 32 Bit ARM.

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.


Thanks for your investigation and my respect for finding the real problem.

Didn’t you say that the newest version was working fine?

but I also said that I had to correct my saying.
Anyway, at least you found the problem.

It would really be interesting why different outcome on different platforms occurs with the same jar. Let’s follow on the XCharts issue tracker.

Thanks for now !

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?

I use a Pine64 with ubuntu and oracle java 8 arm64 (121 and 152).

So maybe it’s an arm64 issue? I have arm64 and oracle java 1.8.0_151.

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 :wink:

Perhaps I can try the 32 arm java tomorrow …

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.