United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6772137 D3D: Dragging the scroll bar of a JScrollPane containing a JTree causes incorrect red
JDK-6772137 : D3D: Dragging the scroll bar of a JScrollPane containing a JTree causes incorrect red

Details
Type:
Bug
Submit Date:
2008-11-17
Status:
Resolved
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2009-01-09
Component:
client-libs
OS:
windows_xp
Sub-Component:
2d
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:

Related Reports
Backport:

Sub Tasks

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
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.
                                     
2008-11-19
EVALUATION

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

Re-opening to address issues with older device drivers.
                                     
2008-11-26
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 },
                                     
2008-12-05
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.
                                     
2008-12-05
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 },
                                     
2008-12-06
SUGGESTED FIX

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



Hardware and Software, Engineered to Work Together