JDK-6351698 : Regression: 4506928 testcase is passing with 142_10-b03 but failing with 142_11-b01
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2_11,5.0,5.0u10,5.0u8,6
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows,windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2005-11-17
  • Updated: 2010-12-03
  • Resolved: 2005-12-09
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 Other JDK 6
1.4.2_11 b02Fixed 5.0u9Fixed 6Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Application.java is passing with 142_10-b03 but failing with 142_11-b01

Testcase Location:
==================
/net/urts071.india/export6/testSuites/Regression/workspace_142/test/CTE_REGTEST/Generic/4506928

Operating System: Win XP Pro
=================

JDK:
====
java -version
java version "1.4.2_11-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-ea-b01)
Java HotSpot(TM) Client VM (build 1.4.2_11-ea-b01, mixed mode)

Steps to reproduce:
===================
1. copy attached Application.java, MainFrame.java, SecondFrame.java, Test4506928.java and jemmy.jar files into test machine.
 
2) Compile all .java files with tested JDK with following command:
   <jdk location>/bin/javac -classpath ./jemmy.jar *.java
   (Jemmy is at /net/urts071.india/export2/tools/Jemmy/jemmy.jar)

3) Start the test with the following command:
   <jdk location>java Application.

4) When the main frame shows up click on "Open Form" button to bring up
   the second frame.

5) Click "Choose File" to bring up FileDialog window.

6) Click "Cancel" when FileDialog shows up to close it.

7) Keep repeating steps 4 - 6 until you have 3 SecondFrames open.

8) Close all SecondFrames and press "Garbage Collect" button.
 
Output:
=======
Test Fails: The message below "Garbage Collect" button says:
            "SecondFrame instances = 2 or 3".

Expected Behaviour:
==================
The message below "Garbage Collect" button says:
            "SecondFrame instances = 0 or 1".

Comments
SUGGESTED FIX awt_Cursor.cpp --- 477,486 ---- if (jobject jcomp = AwtComponent::FindHeavyweightUnderCursor(u)) { if(jobject jpeer = AwtObject::GetPeerForTarget(env, jcomp)) { if(AwtComponent *awtComponent = (AwtComponent*)JNI_GET_PDATA(jpeer)) { awtComponent->setCursorCache(hCursor); } + env->DeleteLocalRef(jpeer); } + env->DeleteGlobalRef(jcomp); } *** (#1 of 1): [ UNSAVED ] ###@###.###
18-11-2005

EVALUATION The bug is caused by the fix for 5097531. There are two references not being cleared and hence causing the gc problem. See suggested fix.
18-11-2005

EVALUATION *** (#1 of 1): [ UNSAVED ] ###@###.###
18-11-2005