March 12, 2009

Compatibility issue with Sun's Java 6 Update 12

I was able to confirm that a compatibility problem exist when running CVD (ie Chess Viewer Deluxe) applet under the latest JRE 6 Update 12 from Sun. The following picture shows how the CVD’s chessboard will appear on your screen if you’re having this kind of trouble.

Sun's JRE 6u12 Issue

Notice that the overall functionality of the applet wouldn’t be affected except for the “Flip Board” button (which is completely missing) in the lower left corner. The board could still be flipped by using the keyboard (Ctrl-F) or by clicking the vertical coordinate system area.

I witnessed the same behavior both on Windows and Linux when I used the JRE 6 Update 12. For the record, this is the first time CVD has ever had such an issue. Since its initial release 3.0 (Sep 2007), the applet has been running quite successfully under many different JREs on several platforms. I’m sure many other applets will be affected in a similar way and I hope that JRE developers will resolve the problem in their future releases.

A very curious section can be found in the Java SE 6 Update 12 Release Notes document.

AWT Support
As of this release, please note the following.
  • Limited mixing of heavyweight and lightweight components is supported. Limited mixing means that some components may not be handled perfectly. This includes, but is not limited to, support for non-opaque lightweight components.
  • Translucent windows may not work correctly on some X11 systems. This problem is described in 6762511.

A reader might get the idea that some functionality is already (and will be) missing (as of now). Would you blame a confident Java developer for being too optimistic if he/she (indeed) expects that everything is “handled perfectly”? In my mind, such a vague language is only appropriate for a “Known Issues” section (which this is not). The AWT specification, being one of the oldest parts of Java VM (1995), should not be taken lightly. That’s why, I do appreciate the good news that JRE 6 Update 12 release fixes 14 of AWT bugs as listed in the “Bug Fixes” section of the same document.

The really good news is that (quote) “Users who have Java SE 6 Update 11 have the latest security fixes and do not need to upgrade to this release to be current on security fixes.” Apparently, the best advice I can give you is to stay away from Sun’s JRE 6 Update 12 unless you have a compelling reason not to do so.

UPDATE: An observation that might prove useful to somebody. While configuring my Linux system to use Java SE 6 Update 11 I noticed that if I try to use the "Next-generation Plug-In Technology", so called plugin2, (in $JAVA_HOME/lib/i386/libnpjp2.so) I could reproduce the same problem as above. On the contrary, if I go for the "Classic Plug-In" (in $JAVA_HOME/plugin/i386/ns7/libjavaplugin_oji.so) everything works as usual with no problems whatsoever.

UPDATE: (05/05/09) After a long discussion with Sun’s JRE engineers they’re, finally, admitting that something isn't quite right at their end. They say the area might require further investigation. Shortly, I’m not impressed by the support I received for the two test cases I prepared. The amount of time I spent exceeded by far the number of meaningful responses to my questions.

The good news is that a fellow developer came up with a workaround which seems to be working. As far as I can tell it is undocumented but, for the lack of a better solution, I'm willing to give it a try and implement the workaround as a patch release.

UPDATE: (05/12/09) Resolved. There is a new CVD release 3.5 which takes care of the latest JRE problems. Download it from the CVD’s Home Page

4 comments:

 
author Anonymous
authorUrl 
adminClass blog-admin pid-1993144935
data:comment.favicon 
Anonymous said...

Hi Nick-
I already upgrade to 12 yesterday and noticed the problem right away. I there a way for me to revert back to 11? I will hold-off upgrading on my other laptop.

Chad

 
author Nikolai Pilafov
authorUrl https://www.blogger.com/profile/00695284688005658187
adminClass blog-admin pid-8567400
data:comment.favicon 
Nikolai Pilafov said...

No problem, Chad.
First, uninstall the release that you don’t want and visit JRE 6 Update 11. Follow the JRE link and download the product for your platform.

 
author Nikolai Pilafov
authorUrl https://www.blogger.com/profile/00695284688005658187
adminClass blog-admin pid-8567400
data:comment.favicon 
Nikolai Pilafov said...

So far so good!
It’s been a week since the 3.5 release is out and I don’t have any complaints.
My main concern was the JRE 6u12 where the problem was found first and I made my pre-release testing on that platform. It takes a lot of time and I cannot possible test every future version/build of JRE. That’s why I’m asking for users’ feedback to fill that gap.

As I explained above the workaround is of “AS IS” type. I couldn’t find a system documentation that supports it and we can only hope that JRE developers aren’t going to change up their mind again. If the AWT specification, which is about 14 years old, isn’t respected enough I can hardly believe that anything else would be. Shortly, there is no guarantee that the workaround would keep working forever.

 
author Unknown
authorUrl https://www.blogger.com/profile/01352504903468798578
adminClass blog-admin pid-58098711
data:comment.favicon 
Unknown said...

What was the workaround?