JDK-6877831 : Microsoft ClearType font-smoothing crashes Java JRE v6.0 with no error messages
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u16
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-09-01
  • Updated: 2016-02-10
  • Resolved: 2009-09-11
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP SP2

EXTRA RELEVANT SYSTEM CONFIGURATION :
IBM Thinkpad x60s

A DESCRIPTION OF THE PROBLEM :

This Bug Report is about a very obscure bug in Font Smoothing in Windows XP (at least) concerning JRE v6.0 and "ClearType".

It's a "Moby Dick" of a bug, in that it will take down your Java installation without a trace nor explanation, never to be seen again.

My system is Microsoft Windows XP SP2 on an IBM Thinkpad x60s, but the problem is probably generic to Windows OS.

The problem exists in JRE v6.0 Update 10 and previously.

I am an end user and not a Java Developer, so please bear with me.

I search the Java Bug Database but could not find anything relevant.

First some citations:

http://forums.java.net/jive/thread.jspa?threadID=60919&tstart=0
http://www.experts-exchange.com/Software/Internet_Email/Web_Browsers/Internet_Explorer/Q_23848330.html
http://www.rarst.net/software/cleartype-install4j-java-bug/

The latter link provides some technical insight.

I have encountered the bug previously in system builds using the v6.0 branch of the JRE, but did not discover the cause, hence usually I have reverted back to the v5.0 legacy branch of the JRE, since it worked reliably.

However recently I had to install v6.0 for a particular Java app and was surprised and delighted that it worked - for a few weeks - and then Java simply stopped working:

- No java application would run
- The Java Control Panel would not run.
- Absolutely no indication of what was wrong - no error messages.

No error messages - a *very* obscure bug.

Initially I used the Revo Uninstaller: http://www.revouninstaller.com/

And also "JavaRa": http://sourceforge.net/projects/javara/

  To do a thorough "scorced earth" deinstall of the v6.0 JRE and then a reinstall - all to no avail.

Cleaning, again v6.0 and then installing the latest v5.0 JRE got my Java apps running - but was not a solution since I needed the v6.0 JRE to work, so I reinstalled it and plodded along.

Patiently trawling Google using variant search terms, I was lucky to find a reference to "ClearType" font-smoothing in Windows O/S, I followed the suggestion and disabled ClearType and consequently v6.0 JRE worked, all apps would run, and the Java Control Panel worked as expected.

Upon re-enabling ClearType, no app would run, nor would the Java Control Panel and there were no error messages - not even in a terminal window, running java from the command line.

I then downloaded the ClearType Tuner PowerToy from Microsoft and "re-tuned" my ClearType parametrisation.

http://www.microsoft.com/typography/ClearTypePowerToy.mspx

Once I did that, v6.0 JRE would work and has, for now, continued to work.

One thing I recall when I temporarily reverted to v5.0 is the reminder that the font rendering looks very "tinny" and does not appear to engage in ClearType font-smoothing - and that is why it works.

When the v6.0 JRE works, the font-rendering looks very good indeed - when it works..

So this obscure bug is, initially, a "Heisenbug", but once it manifests on a system, for whatever reason, it becomes a "Bohrbug", with the toggling on and off of ClearType font-smoothing. And it would appear that a "fix" is to re-tune using the ClearType Tuner PowerToy - at least on my system.

Considering this whole sorry saga a deep instability and vulnerability in the v6.0 JRE, I searched for alternatives to using ClearType and was fortunate enough to discover "GDI++":

GDI++ Font Smoothing, The Developer's website:

http://drwatson.nobody.jp/gdi++/index-en.html

The Developer's latest builds:

http://free.flop.jp/gdi++/upload.php?page=1

http://lifehacker.com/5190607/gdi%252B%252B-adds-os-x-font-rendering-to-windows

http://estevaomascarenhas.com/blog/2009/01/howto-1-mac-osx-font-smoothing-in-windows/
http://vladg.com/2009/03/make-windows-fonts-look-as-smooth-as-mac-os-x-fonts/

NOTE CAREFULLY: The latter two have a convenient up-to-date download link for the application - I recommend downloading that for testing and using the tray application therein...

  To use GDI++, your first disable ClearType, and then run the tray app, and choose your style of font-smoothing.

One very interesting behaviour that I experienced on my system is that with ClearType disabled and GDI++ enabled instead, the v6.0 JRE behaved exactly as the original heisenbug:

- No Java app would run
- The Java Control Panel would not work
- There was no error messages discernable.

Since the ClearType problem is a heisenbug, you many not be able to replicate it on your windows test systems. Possibly if you install the Tuner PowerToy, you could deliberately "de-tune" ClearType and possibly force the problem into becoming a Bohrbug - I haven't tested that.

However since, it appears, GDI++ forces the bug to manifest reliably, you could use it to gain insight into the ClearType heisenbug.

Given that this bug is so *obscure*, it that everything just stops working with no explanation or error trail, the extent of suffering for v6.0 JRE users, particularly among the end users, could well be very large indeed...

And if they don't chance upon a cleartype reference, then if they don't revert to the V5.0 legacy JRE, then they are up the proverbial creek without a paddle.

Since the bug produces no information, even if people asked in forums, what information could they provide?

So my reflection to Java Engineering is that this is *NOT* a minor bug at all, but a major one, it could start to manifest at any time.

And it effects the suitability of Java for mission critical applications on windows systems.

In addition to fixing the problem I also suggest a FAQ entry for JRE v6.0 installation, Update 10 and prior.

Brian Westlake

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
[PLEASE REFER TO THE DESCRIPTION FIELD FOR THE FULL STORY, THANKYOU]

The ClearType crash problem cannot be forced, it would seem.

However here is a means (see the full story in the description field) of reproducing similar behaviour- GDI++:

GDI++ Font Smoothing, The Developer's website:

http://drwatson.nobody.jp/gdi++/index-en.html

The Developer's latest builds:

http://free.flop.jp/gdi++/upload.php?page=1

http://lifehacker.com/5190607/gdi%252B%252B-adds-os-x-font-rendering-to-windows

http://estevaomascarenhas.com/blog/2009/01/howto-1-mac-osx-font-smoothing-in-windows/
http://vladg.com/2009/03/make-windows-fonts-look-as-smooth-as-mac-os-x-fonts/

NOTE CAREFULLY: The latter two have a convenient up-to-date download link for the application - I recommend downloading that for testing and using the tray application therein...

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
- No Java application will run
- The Java Control Panel will not run.
- There are no error messages.

[PLEASE REFER TO THE DESCRIPTION FIELD FOR THE FULL STORY, THANKYOU]
ACTUAL -
Nothing works!!!

No traces...

[PLEASE REFER TO THE DESCRIPTION FIELD FOR THE FULL STORY, THANKYOU]

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No trace information available.

However refer to: http://www.rarst.net/software/cleartype-install4j-java-bug/

[PLEASE REFER TO THE DESCRIPTION FIELD FOR THE FULL STORY, THANKYOU]

REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
Not Applicable.

[PLEASE REFER TO THE DESCRIPTION FIELD FOR THE FULL STORY, THANKYOU]
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
[PLEASE REFER TO THE DESCRIPTION FIELD FOR THE FULL STORY, THANKYOU]

The "re-tuning" of ClearType font-smoothing using the ClearType PowerToy can fix the problem from manifesting, at least for a while...

http://www.microsoft.com/typography/ClearTypePowerToy.mspx

This is merely a workaround and not a permanent solution.

Comments
EVALUATION I haven't received any of the information requested. The originally referenced website is back on line and does seem to indicate this is a duplicate of 6503988 which is fixed in JDK7.
11-09-2009

EVALUATION I'm not sure about the "crashes with no error messages" bit. Even a nasty SEGV is usually caught by hotspot. The submitter is pointing us at a site on "rarst.net" which is apparently inaccessible due to being "hacked (again)", unquote so I'm not sure I want to visit that site :-) Overall it appears probable he's describing bug 6503988 : Applets, applications with fonts/graphics won't run which is caused by an incorrect windows registry setting. The cleartype tuner is known to fix this. If this is happening repeatedly he's got some other software that's breaking his window registry. I think we need to see the result of opening up a DOS-prompt window and running a JDK sample such as "Swingset" in that window, to see what errors are actually logged. If we don't get something soon I'll close this out as a duplicate of 6503988.
01-09-2009