JDK-6772137 : D3D: Dragging the scroll bar of a JScrollPane containing a JTree causes incorrect red
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-11-17
  • Updated: 2011-02-16
  • Resolved: 2009-01-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.
JDK 6 JDK 7
6u12Fixed 7 b43Fixed
Description
FULL PRODUCT VERSION :
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
If there is a JTree in a JScrollPane, dragging the vertical scroll bar causes the node icons and labels to be redrawn incorrectly (they change colour and almost disappear in some cases)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached code. Drag the scrollbar down

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Nodes should scroll with no artefacts
ACTUAL -
Node icons and labels change colour

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.util.*;

/**
 * Test case for redraw bug in JTree in 6.0u10
 *
 * Dragging the scroll bar of a JScrollPane containing a JTree causes incorrect redraw
 * of JTree nodes - icons and labels change colour and grow faint.
 *
 * HTML for IE:
 *   <html>
 *     <body>
 *       <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="100%" height="100%">
 *         <param name="java_code" value="JTreeRedraw.class">
 *         <param name="type" value="application/x-java-applet;version=1.4">
 *       </object>
 *     </body>
 *   </html>
 */
public class JTreeRedraw extends JApplet {

    private class TestPanel extends JPanel {

        public TestPanel() {
            Vector<String> v = new Vector<String>();
            for (int i = 0; i < 100; ++i)
                v.add("Node " + i);

            JTree       t  = new JTree(v);
            JScrollPane sp = new JScrollPane(t);

            add(sp);
        }
    }

    public void init() {
        SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    getContentPane().add(new TestPanel());
                }
            });
    }
}


---------- END SOURCE ----------

Comments
SUGGESTED FIX http://hg.openjdk.java.net/jdk7/2d/jdk/rev/b163d898f83f
09-12-2008

SUGGESTED FIX Fix for all Quadro FX family: diff -r 15435c60c751 src/windows/native/sun/java2d/d3d/D3DBadHardware.h --- a/src/windows/native/sun/java2d/d3d/D3DBadHardware.h Thu Dec 04 11:21:26 2008 -0800 +++ b/src/windows/native/sun/java2d/d3d/D3DBadHardware.h Fri Dec 05 16:40:32 2008 -0800 @@ -102,6 +102,32 @@ // Reason: workaround for 6653860 { 0x10DE, 0x00FD, D_VERSION(6,14,10,6573), OS_WINXP }, + // Nvidia Quadro FX family + // Reason: workaround for 6772137 + { 0x10DE, 0x00F8, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x009D, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x029C, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x029D, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x029E, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x029F, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x01DE, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x039E, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x019D, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x019E, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x040A, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x040E, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x040F, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x061A, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x06F9, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x05FD, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x05FE, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x004E, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x00CD, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x00CE, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x014C, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x014D, D_VERSION(6,14,10,9381), OS_WINXP }, + { 0x10DE, 0x014E, D_VERSION(6,14,10,9381), OS_WINXP }, + // Nvidia GeForce 6200 TurboCache(TM) // Reason: workaround for 6588384 { 0x10DE, 0x0161, NO_VERSION, OS_VISTA },
06-12-2008

SUGGESTED FIX diff -r 15435c60c751 src/windows/native/sun/java2d/d3d/D3DBadHardware.h --- a/src/windows/native/sun/java2d/d3d/D3DBadHardware.h Thu Dec 04 11:21:26 2008 -0800 +++ b/src/windows/native/sun/java2d/d3d/D3DBadHardware.h Fri Dec 05 14:35:25 2008 -0800 @@ -102,6 +102,10 @@ // Reason: workaround for 6653860 { 0x10DE, 0x00FD, D_VERSION(6,14,10,6573), OS_WINXP }, + // Nvidia Quadro FX 1400 + // Reason: workaround for 6772137 + { 0x10DE, 0x00CE, D_VERSION(6,14,10,9381), OS_WINXP }, + // Nvidia GeForce 6200 TurboCache(TM) // Reason: workaround for 6588384 { 0x10DE, 0x0161, NO_VERSION, OS_VISTA },
05-12-2008

EVALUATION Need to block drivers earlier than 6,14,10,9381 . Given the number of issues with Quadro FX line with older drivers we should consider limiting the driver version for whole line.
05-12-2008

EVALUATION Re-opening to address issues with older device drivers.
26-11-2008

EVALUATION Closing the report as the submitter has confirmed upgrading the video driver has resolved this problem.
24-11-2008

EVALUATION I can't reproduce this on my system (XP SP3, IE7, Nvidia board). Need more information about the configuration. Please run any java app from the console, with this env. variable set: J2D_TRACE_LEVEL=4 and provide the output. Also, please make sure that you have the latest video drivers. If updating the drivers helped, please let us now the driver version which helped (can be obtained with the same J2D_TRACE_LEVEL env. variable). But please save the version of the driver that didnt' work as prior to updating.
19-11-2008