You are not logged in.

#1 2015-10-24 00:31:04

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 172

Java apps with broken UI

I have several java apps that have broken UI. This screenshot http://i.imgur.com/29jNQ3X.png is from Minecraft launcher, but RapidMiner (the other one I remember trying a few weeks ago) has similar issues. I had some older jre6 version installed, so I tried updating to the latest jre from aur, but it didn't really help. The issue still persists. Any idea, what might cause it?

$ java -showversion
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
$ uname -roms
Linux 4.2.3-1-ARCH x86_64 GNU/Linux

this is what I get when try to run the launcher directly from terminal, but I don't really see anything wrong with that

$ java -jar Minecraft.jar 
Bootstrap (v5)
Current time is Oct 24, 2015 2:26:31 AM
System.getProperty('os.name') == 'Linux'
System.getProperty('os.version') == '4.2.3-1-ARCH'
System.getProperty('os.arch') == 'amd64'
System.getProperty('java.version') == '1.8.0_66'
System.getProperty('java.vendor') == 'Oracle Corporation'
System.getProperty('sun.arch.data.model') == '64'

Looking for update
Downloading: https://s3.amazonaws.com/Minecraft.Download/launcher/launcher.pack.lzma
Got reply in: 946ms
No update found.
Reversing LZMA on /home/marek/.minecraft/launcher.pack.lzma to /home/marek/.minecraft/launcher.pack
Unpacking /home/marek/.minecraft/launcher.pack to /home/marek/.minecraft/launcher.jar
Cleaning up /home/marek/.minecraft/launcher.pack
Starting launcher.
[02:26:38 INFO]: Minecraft Launcher 1.6.44 (through bootstrap 5) started on linux...
[02:26:38 INFO]: Current time is Oct 24, 2015 2:26:38 AM
[02:26:38 INFO]: System.getProperty('os.name') == 'Linux'
[02:26:38 INFO]: System.getProperty('os.version') == '4.2.3-1-ARCH'
[02:26:38 INFO]: System.getProperty('os.arch') == 'amd64'
[02:26:38 INFO]: System.getProperty('java.version') == '1.8.0_66'
[02:26:38 INFO]: System.getProperty('java.vendor') == 'Oracle Corporation'
[02:26:38 INFO]: System.getProperty('sun.arch.data.model') == '64'
[02:26:38 INFO]: proxy == DIRECT
[02:26:38 INFO]: JFX is already initialized
[02:26:39 INFO]: Refreshing local version list...
[02:26:39 INFO]: Refreshing remote version list...

I just noticed that Java Policy settings is broken in the same way: http://i.imgur.com/5wOtwKA.png

Last edited by JonnyRobbie (2015-10-24 01:13:26)

Offline

#2 2015-10-24 01:10:09

mpan
Member
Registered: 2012-08-01
Posts: 1,675
Website

Re: Java apps with broken UI

Could you test if the issue is reproducible using OpenJDK and some libre Java application¹?

Also: providing fontconfig debug output, fontconfig configuration (if you are using custom one) and a list of installed fonts might help. I'm suspecting something goes wrong when Swing calculates height of a font.
____
¹ The AGPL version of RapidMiner seems way too young to be considered libre.

Last edited by mpan (2015-10-24 01:17:41)

Offline

#3 2015-10-24 01:28:20

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 172

Re: Java apps with broken UI

Ok, OpenJDK does not seem to have this issue and appears to be working fine. I've tried only Minecraft however. I don't know/have any libre application I could try that on.

$ pacman -Qs jre
local/jre8-openjdk-headless-infinality 8.u60-1
    OpenJDK Java 8 headless runtime environment with infinality patch applied
local/jre8-openjdk-infinality 8.u60-1
    OpenJDK Java 8 full runtime environment with infinality patch applied
$ java -showversion 
openjdk version "1.8.0_60"
OpenJDK Runtime Environment (build 1.8.0_60-b24)
OpenJDK 64-Bit Server VM (build 25.60-b23, mixed mode)

Are there any performance issues with OpenJDK? I think Oracle java is recommended on Minecraft's website (I don't exactly know the reason).

But the fonts really might be an issue with the oracle. I have set it up that it works fine in my KDE, but I'm not sure how clean that config is.
I can't find the fontconfig log, here's my custom.conf:

$ cat ~/.config/fontconfig/fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
        <match target="font">
                <edit mode="assign" name="rgba">
                        <const>rgb</const>
                </edit>
        </match>
        <match target="font">
                <edit mode="assign" name="hinting">
                        <bool>true</bool>
                </edit>
        </match>
        <match target="font">
                <edit mode="assign" name="hintstyle"/>
        </match>
        <match target="font">
                <edit mode="assign" name="antialias">
                        <bool>true</bool>
                </edit>
        </match>
        <alias>
                <family>Arial</family>
                <prefer>
                        <family>SF UI Text</family>
                </prefer>
                <default>
                        <family>sans-serif</family>
                </default>
        </alias>
        <alias>
                <family>ArialBc</family>
                <prefer>
                        <family>SF UI Text</family>
                </prefer>
        </alias>
        <alias>
                <family>Helvetica</family>
                <prefer>
                        <family>SF UI Text</family>
                </prefer>
        </alias>
        <alias>
                <family>Helvetica Neue</family>
                <prefer>
                        <family>SF UI Text</family>
                </prefer>
        </alias>
        <alias>
                <family>serif</family>
                <prefer>
                        <family>Linux Libertine</family>
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>SF UI Text</family>
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>Inconsolata-g</family>
                </prefer>
        </alias>
        <match>
                <test compare="contains" name="lang">
                        <string>ja</string>
                </test>
                <test name="family">
                        <string>sans-serif</string>
                </test>
                <edit mode="prepend" name="family">
                        <string>Source Han Sans</string>
                </edit>
        </match>
        <match>
                <test compare="contains" name="lang">
                        <string>zh</string>
                </test>
                <test name="family">
                        <string>sans-serif</string>
                </test>
                <edit mode="prepend" name="family">
                        <string>Source Han Sans</string>
                </edit>
        </match>
        <match>
                <test compare="contains" name="lang">
                        <string>ja</string>
                </test>
                <test name="family">
                        <string>serif</string>
                </test>
                <edit mode="prepend" name="family">
                        <string>IPAPMincho</string>
                </edit>
        </match>
        <match>
                <test compare="contains" name="lang">
                        <string>zh</string>
                </test>
                <test name="family">
                        <string>serif</string>
                </test>
                <edit mode="prepend" name="family">
                        <string>IPAPMincho</string>
                </edit>
        </match>
        <dir>~/.fonts</dir>
</fontconfig>

Last edited by JonnyRobbie (2015-10-24 01:53:39)

Offline

#4 2015-10-25 03:07:42

mpan
Member
Registered: 2012-08-01
Posts: 1,675
Website

Re: Java apps with broken UI

I was asking for OpenJDK to avoid using nonfree software to help you with the issue. Therefore if you can't reproduce the bug under OpenJDK, it's actually a bad news, until you're OK with using it.

I can't tell if OpenJDK is slower than Oracle's HotSpot. They share nearly whole codebase, with only minor changes and additions in HotSpot. If everything works fast enough for you with OpenJDK, just go with it. I've never had any problems with its performance. If any, the issues were related to a bit different default configuration, which was sometimes revealing that noobs were writing software — for example using JFrame.EXIT_ON_CLOSE in an applet.

If Minecraft's website suggests Oracle's software, I'm nearly sure it does it not for performance reasons, but because no one tested it with OpenJDK.

Do you consider the issue to be solved now, or should I setup a virtual machine to try to reproduce the bug with HotSpot and RapidMiner?

Last edited by mpan (2015-10-25 03:10:14)

Offline

#5 2015-10-25 09:28:46

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 172

Re: Java apps with broken UI

mpan wrote:

Do you consider the issue to be solved now, or should I setup a virtual machine to try to reproduce the bug with HotSpot and RapidMiner?


That's a tricky question, because while it technically didn't get solved (it probably still doesn't work under oracle), the workaround seems good enough. There are some complications for example. I remember that minecraft launcher working a few days/weeks? ago. So there must have been some change either on my or on their side. And I remember messing around with fontconfig, that's why I said it might be the issue after your suggestion.

I knew that RapidMined didn't work a few months ago but I forgot to test it now before I installed openjdk where it works fine.

So while I cannot mark the thread as solved, openjdk seems to be working well enough you don't need to trouble yourself unless you really want to (especially if it's the font issue, it might be really hard to reproduce my setup and it might work fine for you). Thanks for the help.

Offline

#6 2015-11-30 03:58:27

mpan
Member
Registered: 2012-08-01
Posts: 1,675
Website

Re: Java apps with broken UI

Do you have ttf-bitstream-vera, noto-fonts, noto-fonts-cjk or noto-fonts-emoji installed? This thread suggests that either lack of the first one, or presence of the others causes a similar issue. A quick search on the web suggests noto-fonts may be the culprit.

Offline

Board footer

Powered by FluxBB