JDK-4915437 : Regression-test javax/swing/plaf/synth/SynthPainter/unitTest/UnitTest.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2003-09-01
  • Updated: 2010-06-08
  • Resolved: 2003-10-23
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
5.0 b26Fixed
Related Reports
Relates :  
Relates :  
Description

Name: iaR10016			Date: 08/31/2003


Filed By     : J2SE-SQA [###@###.###
JDK          : JDK1.5.0-b17, JDK1.5.0-b16, JDK1.5.0-b15, JDK1.5.0-b14
                (This is a new Regression test which is abcent in previous JDKs)
Testbase     : Regression-test
Platform[s]  : RedHat Advanced Server 2.1 (Gnome2), Suse 8.2 (Gnome2), Suse 8.1 (Gnome2)
                (I am not able to reproduce the failure on Solaris sparc, Solaris x86, Windows systems I have)
switch/Mode  : all
Falling tests: javax/swing/plaf/synth/SynthPainter/unitTest/UnitTest.java

Test source location:
=====================
/java/re/jdk/1.5.0/promoted/latest/ws/j2se/test/javax/swing/plaf/synth/SynthPainter/unitTest/UnitTest.java

jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b17/regtest/linux/redhat_advserver21_gnome_smp_linux-24/workDir/test/javax/swing/plaf/synth/SynthPainter/unitTest/UnitTest.jtr

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/linux"
TEST_BASE_PATH="/net/linux-15/export/home/java/regtest.tiger/test"
TESTWITH=$JAVA_HOME
TESTJAVA=$JAVA_HOME
JTOPTS="-server"
TESTVMOPTS="-server"
export CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar:$JT_HOME/jemmy/jemmy.jar"

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 $JTOPTS -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-24" -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/javax/swing/plaf/synth/SynthPainter/unitTest/UnitTest.java"
--- script end ---

Test output (jtr part):
=======================
----------System.out:(0/0)----------
----------System.err:(0/0)----------
result: Passed. Compilation successful

#section:main
----------messages:(3/115)----------
command: main UnitTest
reason: Assumed action based on file name: run main UnitTest
elapsed time (seconds): 1.637
----------System.out:(2/79)----------
TESTING: javax.swing.JScrollBar
pref: java.awt.Dimension[width=200,height=200]
----------System.err:(27/1581)----------
java.lang.reflect.InvocationTargetException
     at java.awt.EventQueue.invokeAndWait(EventQueue.java:839)
     at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1257)
     at UnitTest.main(UnitTest.java:18)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:324)
     at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
     at java.lang.Thread.run(Thread.java:549)
Caused by: java.lang.RuntimeException: arrowButtonBorder: was not inovked
     at LoggingPainter.wasInvoked(LoggingPainter.java:19)
     at UnitTest.test(UnitTest.java:290)
     at UnitTest.<init>(UnitTest.java:70)
     at UnitTest$1.run(UnitTest.java:20)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
     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)

JavaTest Message: Test threw exception: java.lang.reflect.InvocationTargetException
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.reflect.InvocationTargetException
result: Failed. Execution failed: `main' threw exception: java.lang.reflect.InvocationTargetException

test result: Failed. Execution failed: `main' threw exception: java.lang.reflect.InvocationTargetException

Specific machine info:
======================
Hostname: linux-24
OS: RedHat Advanced Server 2.1 (Gnome2)
Hostname: linux-12
OS: RedHat Suse Linux 8.1 (Gnome2)
Hostname: linux-2
OS: Suse Linux 8.2 (Gnome2)

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger tiger-beta FIXED IN: tiger tiger-beta INTEGRATED IN: tiger-b26 tiger-beta VERIFIED IN: tiger-beta
14-06-2004

EVALUATION This test verifies that a bunch of painting methods are invoked. This particular subtest (JScrollBar) appears to be failing because paint is not being invoked on the button child of the JScrollBar. Paint isn't being invoked on the child button as graphics.hitClip is returning false, even though the clip and the bounds of the widget intersect. Reassigning to 2D for further investigation. ###@###.### 2003-09-24 This looks like XAWT problem. The test passes on Solaris and linux with MToolkit, but fails with XAWT. Initial investigation reveals that hitClip (see JComponent.java:747) returns false because SunGraphics2D's devClip is an empty rectangle. The devClip is set from the following stack: SG2D.setDevClip: r=java.awt.Rectangle[x=0,y=0,width=0,height=0] java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1079) at sun.java2d.SunGraphics2D.setDevClip(SunGraphics2D.java:278) at sun.java2d.SunGraphics2D.setDevClip(SunGraphics2D.java:289) at sun.java2d.SunGraphics2D.<init>(SunGraphics2D.java:234) at sun.awt.X11.XWindow.getGraphics(XWindow.java:264) at sun.awt.X11.XDecoratedPeer.getGraphics(XDecoratedPeer.java:83) at java.awt.Component.getGraphics(Component.java:2445) at UnitTest.test(UnitTest.java:285) at UnitTest.<init>(UnitTest.java:70) at UnitTest$1.run(UnitTest.java:20) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) 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 devClip is set to the bounds of the surfaceData, which in turn takes it from the peer: X11WindowSD.getBounds: java.awt.Rectangle[x=0,y=0,width=0,height=0] java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1079) at sun.awt.X11SurfaceData$X11WindowSurfaceData.getBounds(X11SurfaceData.java:493) at sun.java2d.SunGraphics2D.<init>(SunGraphics2D.java:234) at sun.awt.X11.XWindow.getGraphics(XWindow.java:264) at sun.awt.X11.XDecoratedPeer.getGraphics(XDecoratedPeer.java:83) at java.awt.Component.getGraphics(Component.java:2445) at UnitTest.test(UnitTest.java:285) at UnitTest.<init>(UnitTest.java:70) at UnitTest$1.run(UnitTest.java:20) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) 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) X11WindowSurfaceData.getBounds returns peer.getBounds. So, it looks like the dimensions of the peer are not correct for some reason. Reassigning to awt team for further investigation. ###@###.### 2003-09-29 This is most likely a dup of 4918094, 4920533, 4924268 and 4924444. This was a VM bug and it is fixed in b20. ###@###.### 2003-09-29 Name: dsR10078 Date: 09/30/2003 The problem is reproducible with b20. The peer that returns empty bounds is an instance of XContentWindow. UnitTest explicitly calls setBounds() on the frame that eventually propagates the specified bounds to the underlying XFramePeer. XFramePeer reshapes its encapsulated XContentWindow instance only if the frame is visible. UnitTest doesn't make the frame visible, so the bounds are never set for XContentWindow. ###@###.### 2003-09-30 ======================================================================
30-09-2003

SUGGESTED FIX Name: dsR10078 Date: 09/30/2003 Set the bounds for XContentWindow even if the frame is invisible: --- XDecoratedPeer.java Tue Sep 30 13:35:41 2003 *************** *** 306,311 **** --- 306,312 ---- Rectangle client = dimensions.getClientRect(); checkShellRect(client); setShellBounds(client); + reconfigureContentWindow(newDimensions); return; } if (isEmbedded()) { ###@###.### 2003-09-30 ======================================================================
30-09-2003