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

Adding same TableColumn to a TableView multiple times causes infinite loop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • 7u25
    • javafx
    • Windows 7

      tableView.getColumns().addAll(tableColumn, tableColumn);

      The line above causes an infinite loop of exceptions and causes the JavaFX application to lock up. It probably should be an exception, but shouldn't cause an infinite loop.

      Here's the exception:

      SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin 'StringProperty [bean: TableRow[id=null, styleClass=cell indexed-cell table-row-cell], name: skinClassName, value: com.sun.javafx.scene.control.skin.TableRowSkin]' for control TableRow[id=null, styleClass=cell indexed-cell table-row-cell]
      java.lang.IllegalArgumentException: Children: duplicate children added: parent = TableRowSkin[id=null, styleClass=cell indexed-cell table-row-cell]
      at javafx.scene.Parent$1.onProposedChange(Parent.java:307)
      at com.sun.javafx.collections.VetoableObservableList.setAll(VetoableObservableList.java:90)
      at com.sun.javafx.scene.control.skin.TableRowSkin.updateCells(TableRowSkin.java:266)
      at com.sun.javafx.scene.control.skin.TableRowSkin.<init>(TableRowSkin.java:88)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      at javafx.scene.control.Control.loadSkinClass(Control.java:1044)
      at javafx.scene.control.Control.access$500(Control.java:70)
      at javafx.scene.control.Control$12.invalidated(Control.java:972)
      at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:127)
      at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:161)
      at com.sun.javafx.css.StyleableStringProperty.set(StyleableStringProperty.java:71)
      at javafx.scene.control.Control$12.set(Control.java:964)
      at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:59)
      at com.sun.javafx.css.StyleableStringProperty.applyStyle(StyleableStringProperty.java:31)
      at com.sun.javafx.css.StyleableProperty.set(StyleableProperty.java:70)
      at com.sun.javafx.css.StyleHelper.transitionToState(StyleHelper.java:902)
      at javafx.scene.Node.impl_processCSS(Node.java:7415)
      at javafx.scene.Parent.impl_processCSS(Parent.java:1146)
      at javafx.scene.control.Control.impl_processCSS(Control.java:1154)
      at com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1598)
      at com.sun.javafx.scene.control.skin.VirtualFlow.getCell(VirtualFlow.java:1500)
      at com.sun.javafx.scene.control.skin.VirtualFlow.getCellLength(VirtualFlow.java:1523)
      at com.sun.javafx.scene.control.skin.VirtualFlow$3.call(VirtualFlow.java:478)
      at com.sun.javafx.scene.control.skin.VirtualFlow$3.call(VirtualFlow.java:476)
      at com.sun.javafx.scene.control.skin.PositionMapper.computeViewportOffset(PositionMapper.java:143)
      at com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1001)
      at javafx.scene.Parent.layout(Parent.java:1018)
      at javafx.scene.Parent.layout(Parent.java:1028)
      at javafx.scene.Parent.layout(Parent.java:1028)
      at javafx.scene.Parent.layout(Parent.java:1028)
      at javafx.scene.Parent.layout(Parent.java:1028)
      at javafx.scene.Parent.layout(Parent.java:1028)
      at javafx.scene.Parent.layout(Parent.java:1028)
      at javafx.scene.Scene.layoutDirtyRoots(Scene.java:516)
      at javafx.scene.Scene.doLayoutPass(Scene.java:487)
      at javafx.scene.Scene.access$3900(Scene.java:170)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2203)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:363)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
      at com.sun.javafx.tk.quantum.QuantumToolkit$9.run(QuantumToolkit.java:329)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
      at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
      at java.lang.Thread.run(Thread.java:722)

            jgiles Jonathan Giles
            nsorensenjfx Neal Sorensen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: