-
Bug
-
Resolution: Duplicate
-
P5
-
None
-
5.0
-
x86
-
solaris_10
Name: vsR10238 Date: 09/05/2003
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.5.0-b18
Testbase : Regression-test
Platform[s] : Solaris 10 (x86) (CDE)
Falling test[s]:
java/awt/Frame/DisposeStressTest/DisposeStressTest.html
Regression test java/awt/Frame/DisposeStressTest/DisposeStressTest.html test fails very intermittently with JDK1.5.0.
The following output appears in the jtr:
java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(EventObject.java:38)
at java.awt.AWTEvent.<init>(AWTEvent.java:225)
at java.awt.event.ComponentEvent.<init>(ComponentEvent.java:94)
at java.awt.event.FocusEvent.<init>(FocusEvent.java:122)
at java.awt.KeyboardFocusManager.retargetFocusLost(KeyboardFocusManager.java:2659)
at java.awt.KeyboardFocusManager.retargetFocusEvent(KeyboardFocusManager.java:2718)
at java.awt.Component.dispatchEventImpl(Component.java:3800)
at java.awt.Component.dispatchEvent(Component.java:3770)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.SequencedEvent.dispatch(SequencedEvent.java:93)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:459)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:214)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
The test fails very rarely but you can try to reproduce the failure using the script provided below.
I looked over KeyboardFocusManager.java and found the following:
KeyboardFocusManager.retargetFocusLost(FocusEvent fe) consists basically of 4 branches of execution.
The first three perform checking if currenFocusOwner is null, but the last branch does not contain such checking
and passes currenFocusOwner directly to the FocusEvent constructor causing IllegalArgumentException in
the EventObject constructor. Please see the stack trace above for exact line numbers.
I'm filing this bug in hope that although the failure is hardly reproducible the developers may agree
that it worth to add "if (currentFocusOwner == null)" into the last branch of execution.
Test source location:
=====================
/java/re/jdk/1.5.0/promoted/latest/ws/j2se/test/java/awt/Frame/DisposeStressTest/DisposeStressTest.html
How to reproduce:
=================
Run the following script (you may need to change its variables)
--- script start ---
#!/bin/sh
RESULT_DIR=`pwd`
WORK_DIR=$RESULT_DIR/workDir/test
REPORT_DIR=$RESULT_DIR/reportDir
JT_HOME="/net/linux-15/export/home/java/jct"
JAVA_HOME="/net/linux-15/export/home/java/jdk1.5.0/x86"
TEST_BASE_PATH="/net/linux-15/export/home/java/regtest.tiger/test"
TESTVMOPTS="-client"
CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"
TEST="java/awt/Frame/DisposeStressTest/DisposeStressTest.html"
mkdir -p $WORK_DIR/scratch 2>&1
mkdir -p $WORK_DIR/jtData 2>&1
mkdir -p $REPORT_DIR 2>&1
#rm $WORK_DIR/jtData/ResultCache.jtw 2>&1
cd $WORK_DIR/scratch
$JAVA_HOME/bin/java -server -cp $CLASSPATH -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,HOME=$HOME/.regtest,PATH=/bin:/usr/bin,CPAPPEND=$JT_HOME/jemmy/jemmy.jar,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-18" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/$TEST"
--- script end ---
Script output:
==============
Test output (jtr part):
=======================
----------System.out:(0/0)----------
----------System.err:(18/1223)----------
java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(EventObject.java:38)
at java.awt.AWTEvent.<init>(AWTEvent.java:225)
at java.awt.event.ComponentEvent.<init>(ComponentEvent.java:94)
at java.awt.event.FocusEvent.<init>(FocusEvent.java:122)
at java.awt.KeyboardFocusManager.retargetFocusLost(KeyboardFocusManager.java:2659)
at java.awt.KeyboardFocusManager.retargetFocusEvent(KeyboardFocusManager.java:2718)
at java.awt.Component.dispatchEventImpl(Component.java:3800)
at java.awt.Component.dispatchEvent(Component.java:3770)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.SequencedEvent.dispatch(SequencedEvent.java:93)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:459)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:214)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
STATUS:Failed.Applet thread threw exception: java.lang.IllegalArgumentException: null source
result: Failed. Execution failed: Applet thread threw exception: java.lang.IllegalArgumentException: null source
test result: Failed. Execution failed: Applet thread threw exception: java.lang.IllegalArgumentException: null source
Specific machine info:
======================
Hostname: linux-18
OS: Solaris 10 (x86) (GNOME)
======================================================================
- duplicates
-
JDK-4917937 Repaint Test Fails with Motif , on b17
- Resolved