JDK-6862611 : Reg testcase closed/java/awt/Component/NativeInLightShow/NativeInLightShow.html fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-07-21
  • Updated: 2011-01-19
  • Resolved: 2009-10-14
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.
JDK 7
7 b74Fixed
Related Reports
Relates :  
Description
The regression testcase closed/java/awt/Component/NativeInLightShow/NativeInLightShow.html
fails on Jdk7b66 pit build with the following error:
java.lang.RuntimeException
	at NativeInLightShow.start(NativeInLightShow.java:123)
	at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:145)
	at java.lang.Thread.run(Thread.java:717)
STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException
result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException

Also attached is the .jtr file.

Comments
SUGGESTED FIX --- old/src/share/classes/java/awt/Container.java 2009-09-29 18:39:03.000000000 +0400 +++ new/src/share/classes/java/awt/Container.java 2009-09-29 18:39:02.000000000 +0400 @@ -4111,16 +4111,16 @@ mixingLog.fine("this = " + this); } - if (!isMixingNeeded()) { - return; - } - boolean isLightweight = isLightweight(); if (isLightweight && isRecursivelyVisibleUpToHeavyweightContainer()) { recursiveShowHeavyweightChildren(); } + if (!isMixingNeeded()) { + return; + } + if (!isLightweight || (isLightweight && hasHeavyweightDescendants())) { recursiveApplyCurrentShape(); }
29-09-2009

EVALUATION Althogh the recursiveShowHeavyweightChildren() call indeed relates to the concept of hw/lw mixing feature, it doesn't directly relates to the task of calculating heavyweight components' shapes. Therefore, it should not be guarded by the isMixingNeeded() check.
29-09-2009

EVALUATION The testcase shows a frame (there is an AWT button inside the frame), then presses the button. But the button is invisible and the test fails. The hierarchy of the components is java.awt.Frame[frame1,0,0,145x59,layout=java.awt.BorderLayout,title=Test,resizable,normal] java.awt.Container[,8,28,129x23,layout=java.awt.BorderLayout] java.awt.Button[button0,0,0,129x23,label=I'm should be visible!] Before showing the frame the test hides and shows the container and it seems like this is one of the requisites for reproducing the problem. Below is the sequence of the essential steps during the test: - hide the container -> mixOnHiding -> recursiveHideHeavyweightChildren() -> the button becomes invisible - show the container/frame -> mixOnShowing -> isMixingNeeded returns false (invalid bounds) -> NO recursiveShowHeavyweightChildren call and the button is still invisible - validate the frame -> mixOnValidating -> NO recursiveShowHeavyweightChildren call and the button is still invisible The failure is reproducible starting from jdk7 b48, the particular changes that caused this is the mixing enhancements (6797195): src/share/classes/java/awt/Container.java.cdiff.html in the mixOnShowing method: + if (!isMixingNeeded()) { + return; + } +
25-09-2009