JDK-4959178 : Regression test fails for 4905270: Side effect of sun.awt.noerasebackground=true
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2_04
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2003
  • CPU: generic
  • Submitted: 2003-11-24
  • Updated: 2004-02-16
  • Resolved: 2004-01-15
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.
Other
1.4.2_04 04Fixed
Related Reports
Relates :  
Description
The fix for #4905270 is not completed. It pass on Win2000, but fails on WinXP and Win2003 with 1.4.2_04 b01.

How to reproduce:
1. Install 1.4.2_04 b01 on WinXP/Win2003 SE from 
/net/koori.sfbay/p/v11/jdk/1.4.2_04/ea/b01/bundles/windows-i586
2. Run WhiteWin.java from /net/shiva/test/MyTestArea/JDK1.4.2/workspace_142/test/CTE_REGTEST/Generic/4905270 with the following flags:
-Dsun.awt.noerasebackground=true -Dsun.awt.erasebackgroundonresize=true
3. Use a mouse to resize the window.

Expected result:
There is no any residue window border shown on the screen when resizing, if there is the test failed.

Actual Result:
The residue window border shown on the screen when resizing

The problem is seeing when the "Show window contents while dragging" option in " Control Panel -> Display -> Effects" is turned on and off.

The WhiteWin.jtr file is attached below:

#Test Results (version 2)
#Mon Nov 24 14:28:04 PST 2003
#checksum:690f072671de4690
#-----testdescription-----
$file=H:\\shiva\\MyTestArea\\JDK1.4.2\\workspace_142\\test\\CTE_REGTEST\\Generic
\\4905270\\WhiteWin.java
$root=H:\\shiva\\MyTestArea\\JDK1.4.2\\workspace_142\\test
keywords=bug4905270 othervm
run=USER_SPECIFIED main/othervm -Dsun.awt.noerasebackground=true -Dsun.awt.erase
backgroundonresize=true Test4905270\r\n
source=WhiteWin.java
title=Side effect of sun.awt.noerasebackground=true workaround Fixed in JDK1.4.2
_04

#-----environment-----

#-----testresult-----
description=file:///H:/shiva/MyTestArea/JDK1.4.2/workspace_142/test/CTE_REGTEST/
Generic/4905270/WhiteWin.java
end=Mon Nov 24 14:28:04 PST 2003
environment=regtest
execStatus=Failed. Execution failed: `main' threw exception: java.lang.RuntimeEx
ception: Failed
javatestOS=Windows XP 5.1 (x86)
javatestVersion=2.1.5
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build main
start=Mon Nov 24 14:27:46 PST 2003
status=Failed. Execution failed: `main' threw exception: java.lang.RuntimeExcept
ion: Failed
test=CTE_REGTEST/Generic/4905270/WhiteWin.java
work=H:\\results\\jdk1.4.2_04\\JTwork\\CTE_REGTEST\\Generic\\4905270

#section:script_messages
----------messages:(4/203)*----------
JDK under test: (E:\\j2sdk1.4.2_04)
java version "1.4.2_04-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-ea-b01)
Java HotSpot(TM) Client VM (build 1.4.2_04-ea-b01, mixed mode)

#section:build
----------messages:(3/100)----------
command: build Test4905270 
reason: Named class compiled on demand
elapsed time (seconds): 0.094
result: Passed. No need to compile: Test4905270.java

#section:main
----------messages:(3/264)----------
command: main  -Dsun.awt.noerasebackground=true -Dsun.awt.erasebackgroundonresiz
e=trueTest4905270
reason: User specified action: run main/othervm -Dsun.awt.noerasebackground=true
 -Dsun.awt.erasebackgroundonresize=true Test4905270 
elapsed time (seconds): 16.75
----------System.out:(14/1057)----------
Trace:
Start to wait frame "Frame with title "WhiteWin"" opened
Trace:
Frame "Frame with title "WhiteWin"" has been opened in 16 milliseconds
    javax.swing.JFrame[frame0,0,0,400x400,invalid,layout=java.awt.BorderLayout,t
itle=WhiteWin,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=java
x.swing.JRootPane[,4,30,392x366,invalid,layout=javax.swing.JRootPane$RootLayout,
alignmentX=null,alignmentY=null,border=,flags=385,maximumSize=,minimumSize=,pref
erredSize=],rootPaneCheckingEnabled=true]
Trace:
Start to wait frame "Frame with title "Dummy"" opened
Trace:
Frame "Frame with title "Dummy"" has been opened in 0 milliseconds
    javax.swing.JFrame[frame1,0,0,600x600,invalid,layout=java.awt.BorderLayout,t
itle=Dummy,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.s
wing.JRootPane[,4,30,592x566,invalid,layout=javax.swing.JRootPane$RootLayout,ali
gnmentX=null,alignmentY=null,border=,flags=385,maximumSize=,minimumSize=,preferr
edSize=],rootPaneCheckingEnabled=true]
204**204**204
2**2
255**255**255
Test Failed
----------System.err:(13/685)----------
java.lang.RuntimeException: Failed
        at Test4905270.main(Test4905270.java:94)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:
94)
        at java.lang.Thread.run(Thread.java:534)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Failed
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Failed
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeExcep
tion: Failed


test result: Failed. Execution failed: `main' threw exception: java.lang.Runtime
Exception: Failed

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_04 generic tiger-beta2 FIXED IN: 1.4.2_04 tiger-beta2 INTEGRATED IN: 1.4.2_04 tiger-b37 tiger-beta2 VERIFIED IN: 1.4.2_04
14-06-2004

SUGGESTED FIX now use Bino's suggestions in tiger: turn on windowSizing on WM_SIZING turn off on WM_EXITSIZEMOVE. ###@###.### 2004-01-14
14-01-2004

EVALUATION this is because of windows' change in xp before xp, e.g. windows 2000: WM_SIZING WM_ERASEBKGND <- erase background here is ok WM_SIZE WM_PAINT in xp: WM_SIZING WM_ERASEBKGND <- erase here doesnt work some times WM_SIZE WM_ERASEBKGND <- need to do the erase here WM_PAINT so the logic added in the fix for 4905270 doesnt work in xp. need to special case for xp ###@###.### 2003-12-23 The problem is that WM_SIZE does not mark the end of the Size modal loop. Instead WM_EXITSIZEMOVE does. If we set windowSizing to FALSE on this message then it shoudl work. ###@###.### 2004-01-09
09-01-2004