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

NullPointerException when TableCellSkin gets disposed twice

XMLWordPrintable

    • x86_64
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      If we end up in TableRowSkinBase.recreateCells() we first dispose a skin assigned to each cell and then try to set skinProperty to null which in turn leads to the skin disposal call.
      The problem is that in the second TableCellSkin.dispose() call we try to retrieve a control for the skin, but it's already been disposed by the first call.

      TableRowSkinBase.recreate() is called after TableRowSkinBase.fullRefreshCounter riches 0.
      The counter is decreased each time TableRowSkinBase.updateCells(true) is called.

      This was triggered by an attempt to redraw a table by the trick:

      table.getColumns().get(0).setVisible(false);
      table.getColumns().get(0).setVisible(true);

      after each insertion to the table.


        1. TableViewCellDisposeProblem.java
          9 kB
          Kevin Rushforth
        2. TableViewSample.java
          3 kB
          Ambarish Rapte

            arapte Ambarish Rapte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: