Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123424

Moving a root node to be the child of a new root node results in error in Parent.validatePG

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • None

      This clearly is not that high priority since nobody has run into this in the wild. I ran into it while writing the NodeDisposeTest.oldRootAsChildOfNewRootShouldNotDisposePeer method. Basically the setup is this:

              root = new Pane();
              rect = new Rectangle();
              root.getChildren().add(rect);
              scene = new Scene(root, 640, 480);
              stage = new Stage();
              stage.setScene(scene);
              stage.show();
              stage.requestFocus();
              Toolkit.getToolkit().firePulse();

              Pane root2 = new Pane();
              scene.setRoot(root2);
              root2.getChildren().add(root);
              Toolkit.getToolkit().firePulse();

      The error is:

      *** pgnodes.size() [0] != pgChildrenSize [1]
      *** pgnodes.size validatePG() [0] != children.size() [1]

      java.lang.AssertionError: validation of PGGroup children failed
      at javafx.scene.Parent.validatePG(Parent.java:187)
      at javafx.scene.Parent.impl_updatePeer(Parent.java:145)
      at javafx.scene.layout.Region.impl_updatePeer(Region.java:2067)
      at javafx.scene.Node.impl_syncPeer(Node.java:489)
      at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2198)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2328)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:329)

            psafrata Pavel Ĺ afrata
            rbair Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: