JDK-6290253 : Yokogawa applet fails to repaint in Mustang
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-06-24
  • Updated: 2010-08-06
  • Resolved: 2005-09-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6 b53Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Yokogawa Electric is one of our licensed members.  Their applet-based application fails to repaint using J2SE 6.0 builds.

This is a regression as the problem does not occur in 1.5.0_u5-b02 or 
1.5.0_u4-b04 and b05.

The test application provided by Yokogawa is in Sun's Santa Clara QA lab. Please contact <###@###.###> or <###@###.###> if further information needed. 

Tested Platform: 
                  win XP (sp2)/ IE6
                  win 2000 pro(sp4) / IE6

Tested Builds:   
                 JRE 1.6.0-b42           (Failed)
                 JRE 1.5.0_04-b04/b05    (OK)
                 JRE 1.5.0_05-b02        (OK)

Steps to reproduce:

1) Install JRE 1.6.0-b42 onto the test system.
2) Using IE6 browser to invoke the following Yokogawa applet-based application:
3) Click on 'Logon' (Leave the Users ID, password fields blanked)

4) The applet should be loaded 
5) Attempt to
     a) Scroll the applet scrollbars  (either vertically or horizontally)
     b) bring any windows on top of applet window, and then bring the applet window
        back to the foreground again.

Applet fails to repaint. Frequently, the whole applet windows turns black
and user can not interact with the applet any more. 

It works fine using JRE 1.5.0_04-b04/b05, and JRE 1.5.0_05-b02
Trace file is attached.
###@###.### 2005-06-24 00:57:09 GMT
###@###.### 2005-06-24 01:33:05 GMT

Verified the fix in Java SE 6.0-b59 on XP-home(sp2)/IE6
                                       win 2000 pro(sp4)/IE6

EVALUATION I believe I've narrowed this done. The test case consists of a custom JApplet. It would appear this Applet ends up rendering to an offscreen image. With the current code we detect that we aren't rendering to the screen and so don't use the buffer strategy. The problem is that when we get an expose event we think the buffer strategy is in sync and show from it, when it really isn't. The fix is to mark the BufferInfo as out of sync so that the expose event will generate a real paint event and all is well again. I've attached a simpler test case. When you run it you'll see a red square. If you obscure this window with another window and then bring it back to front you'll see the red square is no longer there.

EVALUATION This bug is a regression of the gray box fix 4967886. The bug is not reproducible if the system property "swing.handleTopLevelPaint" is set to false. The applet is Swing-based. AWT provides SwingPaintEventDispatcher with expose notifications. Recategorizing the bug to Swing for further investigation. (The bug 6285677 mentioned in the first evaluation seems to be unrelated to this bug as the applet referred to in 6285677 is AWT-based.)

EVALUATION The same with JRE6.0 b41 in IE6.0 and Mozilla. As there is no any exception in attached stack I suppose that this bag already fixed in Swing (they have had an integration 22-June and perhaps fixed that exception). We need b42 to continue with investigation. According to description this looks similar to 6285677 but don't know for sure as haven't seen it yet. ###@###.### 2005-06-24 13:49:17 GMT This only reproduced with JDK6.0b42. There was an exception with previour builds. It is sufficiently slightly move pressed mouse over one of scrollbars to make screen totally black. Content of the applet may be obtained back by pressing Refresh button in IE's menubar. ###@###.### 2005-06-28 14:00:07 GMT If you try to resize (vertically) window containing applet you will see that applet filled with black. If you resize window horizontally you would see a number of vert. scrollbars remained on applet's painting area - there was no repaint call. ###@###.### 2005-06-28 14:32:27 GMT