JDK-8164633 : JavaFX TreeTableView leaves icons behind when collapsing
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8u92
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2016-08-18
  • Updated: 2016-08-23
  • Resolved: 2016-08-23
Related Reports
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
windows 7 64 bit

EXTRA RELEVANT SYSTEM CONFIGURATION :
Seems the bug is similar to the one described in: https://bugs.openjdk.java.net/browse/JDK-8156049

I can confirm that this bug started in release 1.8.0_92 and still exists in the current version.  It was closed on the page...it shouldn't have been. the bug is still there.

A DESCRIPTION OF THE PROBLEM :
The bug is the same as described in: https://bugs.openjdk.java.net/browse/JDK-8156049

it was closed, but I assure you this still exists.
The treetable doesn't clean up the icons after the table is collapsed.

This started in 1.8.0_92.  I was hoping since the bug was filed it would be fixed, it hasn't yet, I checked the page for progress and it was closed.

I'm confirming that this is a bug that wasn't fixed and I can reproduce it...

REGRESSION.  Last worked in version 8u91

ADDITIONAL REGRESSION INFORMATION: 
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
the original bug report describes how to reproduce it: https://bugs.openjdk.java.net/browse/JDK-8156049

This shouldn't have been closed.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The images for the collapsed child nodes  should disappear when the parent node is collapsed.  
ACTUAL -
The icons of the collapsed nodes remain leaving a visual mess.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
no crash logs.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javafx.application.Application; 
import javafx.beans.property.ReadOnlyStringWrapper; 
import javafx.scene.Group; 
import javafx.scene.Scene; 
import javafx.scene.control.TreeTableColumn; 
import javafx.scene.control.TreeTableColumn.CellDataFeatures; 
import javafx.scene.control.TreeItem; 
import javafx.scene.control.TreeTableView; 
import javafx.stage.Stage; 
import javafx.scene.image.Image; 
import javafx.scene.image.ImageView; 

public class TreeTableViewSample extends Application { 
    private static final Image icon = new Image(TreeTableViewSample.class.getResourceAsStream("icon.png")); 

    public static void main(String[] args) { 
        Application.launch(args); 
    } 

    @Override 
    public void start(Stage stage) { 
        stage.setTitle("Tree Table View Samples"); 
        final Scene scene = new Scene(new Group(), 200, 400); 
        Group sceneRoot = (Group)scene.getRoot(); 

        //Creating tree items 
        final TreeItem<String> childNode1 = new TreeItem<>("Child Node 1", new ImageView(icon)); 
        final TreeItem<String> childNode2 = new TreeItem<>("Child Node 2", new ImageView(icon)); 
        final TreeItem<String> childNode3 = new TreeItem<>("Child Node 3", new ImageView(icon)); 

        //Creating the root element 
        final TreeItem<String> root = new TreeItem<>("Root node", new ImageView(icon)); 
        root.setExpanded(true); 

        //Adding tree items to the root 
        root.getChildren().setAll(childNode1, childNode2, childNode3); 

        //Creating a column 
        TreeTableColumn<String,String> column = new TreeTableColumn<>("Column"); 
        column.setPrefWidth(150); 

        //Defining cell content 
        column.setCellValueFactory((CellDataFeatures<String, String> p) -> 
            new ReadOnlyStringWrapper(p.getValue().getValue())); 

        //Creating a tree table view 
        final TreeTableView<String> treeTableView = new TreeTableView<>(root); 
        treeTableView.getColumns().add(column); 
        treeTableView.setPrefWidth(152); 
        treeTableView.setShowRoot(true); 
        sceneRoot.getChildren().add(treeTableView); 
        stage.setScene(scene); 
        stage.show(); 
    } 
} 
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
none working for me.
Fix the bug.


Comments
This is a probable duplicate of JDK-8157398 which was introduced in 8u92 and fixed in 8u102. The "affected version" of this bug is listed as 8u102, but the output of "java -version" shows 8u101 and the description says that it was introduced in 8u92, so I will test on 8u102 to see whether this bug is still present.
23-08-2016

I can confirm that this is a duplicate of JDK-8157398, which is fixed in JDK 8u102.
23-08-2016

For more investigation, moving this up for dev.
23-08-2016

Additional information from the submitter: ============================================================================= It seems the TreeItem graphic isn't nulled out when it's reused. The graphics remain visible. This bug started on the transition from java 1.8.-0_91 to java 1.8.-0_92. For example for my treetable when maximized I get: - See the attache file (Case-1.PNG) Minimized I get (Icons still remain): - See the attached file (Case-1.PNG) All the icons remain. If I start opening and closing folders it becomes a mess (This was working fine for years until java 1.8.-0_92): - See the attached file (Case-2.PNG)
23-08-2016

According to submitter, having same issue on: C:\Program Files\Java\jre-9\bin>java -version java version "9-ea" Java(TM) SE Runtime Environment (build 9-ea+131) Java HotSpot(TM) 64-Bit Server VM (build 9-ea+131, mixed mode)
23-08-2016

It is a duplicate issue of JDK-8056049. I need you to confirm whether the issue is reproducible with JDK 9ea (latest build) or not.
23-08-2016