ClearType, install4j and case of Java bug
Do you know what ClearType (font-smoothing technology in Windows) has in common with Java (programming language and one of the recommended frameworks) ?
Nothing except that they were working together hard at making me miserable for few months. I had some Java software that I couldn’t install. I mean really couldn’t – not even figure out reason or reproduce it on another PC.
Recently I was approved for Woopra beta (site analytics service) and it uses desktop client written in Java… I couldn’t install. That got me really mad. :)
Story
All of the software in question was similar :
- setup based on install4j;
- setup crashing with bunch of errors.
I was blaming install4j during early (hundred or so) attempts to solve issue. Later I slowly understood that if it was that bugged for that long time – solution would have been created and googled.
Tracing
After shifting focus from install4j I decided to push Java framework. I was trying stable versions earlier so decided to go for non-stable 1.6 Update 10 Release Candidate.
This actually fixed error messages but not crashes. I had also noticed that there was new error log created in directory with setup files. Previously I had only seen logs in Windows temporary directory.
New error log was saying following :
Could not display the GUI. This application needs access to an X Server.
If you have access there is probably an X library missing.
*******************************************************************
You can also run this application in console mode without
access to an X server by passing the argument -c
Very weird to look for X-Server on non-Linux PC, isn’t it? So I decided to try that “-c” argument. And was actually able to install in console mode.
Happy ending? Nope. Now installed app was crashing. But it really got me thinking. If console works but graphical interface doesn’t – there must be problem with latter.
One more error log (in application folder) was now saying (among other things) :
Caused by: java.lang.IllegalArgumentException: -60397977 incompatible with Text-specific LCD contrast key
Which successfully googled me description of bug with Java unable to read non-standard ClearType registry setting.
Solution
I immediately launched ClearType Tuner from Control Panel and found setting showing gibberish number. After correcting it to proper one all problems with Java were instantly gone.

Lessons learned
- Don’t be fast to blame software problems on single application.
- Even minor and totally unrelated settings can launch deadly chain reactions.
Links
Jave Runtime Environment http://www.java.com/en/download/index.jsp
ClearType Tuner http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
Woopra http://www.woopra.com/
install4j http://www.ej-technologies.com/products/install4j/overview.html



Thanks for this posting. I felt so much like you must have felt: So many java applications did not work and no idea why.
Now – everything seems back to normal tuning the cleartype.
Olaf
@Olaf
You are welcome. :) It’s indeed extremely nasty bug and with very obscure reason.
This page was read over hundred times already (guess we aren’t only unlucky enough) and I hope it was of help in each case.
Hello,
This is the most technical insight I have read, to date. :-)
I have also encountered this appalling bug:
http://forums.java.net/jive/thread.jspa?messageID=344456
“Detuning” ClearType might force what is a heisenbug into a bohrbug. Otherwise the GDI++ (cited above) reliably crashes Java and so is a good tool for examining the problem.
Given the crashes are so uninformative, who knows how many have suffered, or are suffering.
Someone with the technical nous, should knock on the door of Java Engineering, firmly, resolutely but politely, and get them to fix this, as well as a FAQ entry.
Mission Critical != Java, at the moment.
Best regards,
Brian
@Brian Westlake
Yeah, this is probably most obscure bug I had ever had to deal with. :)
Java is considerd big thing for business aplications, cross-platform, etc… But personally I prefer native and portable apps over frameworks. You don’t get to run software in drastically different environments without performance overhead and compatibility issues.
@Rarst -
FYI -
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6877831
Even if the bug-report is declared a dupe, the FAQ for the Java SE JRE needs to be patched. :-)
Particularly for domestic end-users of the JRE, there’s not a lot of connect-the-dots pages out there, to grep onto.
Best regards,
Brian
@Brian Westlake
Doesn’t surprise me it was previously reported. Almost year since I wrote this post and who knows how long back issue spans.
Evaluation on that entry says my blog was unavailable (see recent posts, got hacked hard) so you might want to comment there that this post is online again.
Wilco.
Hi Rarst
Another resource, added as a comment on your article, to feed the search engines, to help others in the future.
A very interesting technical account, which is right on topic for this bug:
Serious Java bug triggered by X-Setup tweak
http://www.x-setup.net/forum/showthread.php?p=6856
It also provides a tool for triggering the problem on demand.
Now it’s over to Java Engineering. :-)
Best regards,