Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-2987

Can't view multiple-page results in PDB/Uniprot FTS on Java 10

    Details

    • Type: Bug
    • Status: Being tested
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.10.4, 2.10.4b1
    • Fix Version/s: 2.11.1
    • Component/s: gui, jvdesktop
    • Environment:
      Jalview Version: 2.10.4
      Jalview Installation: webstart git-commit:c0a005c [releases/Release_2_10_4_Branch]
      Build Date: 10 May 2018
      Java version: 10.0.1
      x86_64 Mac OS X 10.10.5

      Description

      On OSX/Java 10, which triggers the Vaqua LaF, exceptions are raised when the FTS dialog displays the first page of results from a query to the PDB that returns more than 200 entries.

      It's only the first page that is affected, when a second page is displayed there's no exception. On 2.10.3/Java 1.8u121 no exception is observed.

      Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
      at org.violetlib.aqua.AquaTableUI$AquaTablePainter.paintCell(Unknown Source)
      at org.violetlib.aqua.BasicTableUIPainter.paintCells(Unknown Source)
      at org.violetlib.aqua.AquaTableUI$AquaTablePainter.paint(Unknown Source)
      at org.violetlib.aqua.AquaTableUI.paint(Unknown Source)
      at java.desktop/javax.swing.plaf.ComponentUI.update(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintComponent(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JViewport.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source)
      at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source)
      at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(Unknown Source)
      at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
      at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
      at java.desktop/javax.swing.RepaintManager.paint(Unknown Source)
      at java.desktop/javax.swing.JComponent.paint(Unknown Source)
      at java.desktop/java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
      at java.desktop/sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
      at java.desktop/sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
      at java.desktop/java.awt.Container.paint(Unknown Source)
      at java.desktop/java.awt.Window.paint(Unknown Source)
      at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
      at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
      at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
      at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
      at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
      at java.desktop/javax.swing.RepaintManager.access$1200(Unknown Source)
      at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
      at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
      at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
      at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
      at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
      at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
      at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

        Attachments

          Issue Links

            Activity

            Hide
            gmungoc Mungo Carstairs added a comment -
            Also seen with Java 11.0.3 in develop.
            Show
            gmungoc Mungo Carstairs added a comment - Also seen with Java 11.0.3 in develop.
            Hide
            gmungoc Mungo Carstairs added a comment - - edited
            Stepping through in the debugger with VAqua5 source on the classpath (from https://violetlib.org/vaqua/sourcecode.html).
            PDB query configured to show PDB id, Title, Experimental Method, Resolution in columns 0-3.
            Search for 70. This returns results with a null value for Resolution where method is NMR.
            In the code:
            - component is null in AquaTableUI$AquaTablePainter.paintCell for row 1 column 3
            - in the table data model of { id, title, method, resolution }
              row[0] has column data [5fpn, Structure of heat shock-related ...in an alternate binding site., X-ray diffraction, 1.96]
              row[1] has column data [1tl6, Solution structure of T4 bacteriphage AsiA monomer, Solution NMR, null]

            paintCell() -> JTable.prepareRenderer() -> getValueAt(1, 3) returns null
                                  -> renderer.getTableCellRendererComponent(,null...) returns null Component
            jalview.fts.core.DecimalFormatTableCellRenderer.getTableCellRendererComponent() is:
                if (value == null)
                {
                  return null;
                }
                value = formatter.format(value);
                return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            Changing this code to:
                value = value == null ? "" : formatter.format(value);
                return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            seems to fix this.

            This was already seen in JalviewJS testing (issue 175, for 'Resolution' for a PDB search, or 'Length' for Uniprot) but resolved somehow in SwingJS.
            This is it resurfacing in VAqua5. Fixing in the Jalview code should be more reliable.
            Show
            gmungoc Mungo Carstairs added a comment - - edited Stepping through in the debugger with VAqua5 source on the classpath (from https://violetlib.org/vaqua/sourcecode.html) . PDB query configured to show PDB id, Title, Experimental Method, Resolution in columns 0-3. Search for 70. This returns results with a null value for Resolution where method is NMR. In the code: - component is null in AquaTableUI$AquaTablePainter.paintCell for row 1 column 3 - in the table data model of { id, title, method, resolution }   row[0] has column data [5fpn, Structure of heat shock-related ...in an alternate binding site., X-ray diffraction, 1.96]   row[1] has column data [1tl6, Solution structure of T4 bacteriphage AsiA monomer, Solution NMR, null] paintCell() -> JTable.prepareRenderer() -> getValueAt(1, 3) returns null                       -> renderer.getTableCellRendererComponent(,null...) returns null Component jalview.fts.core.DecimalFormatTableCellRenderer.getTableCellRendererComponent() is:     if (value == null)     {       return null;     }     value = formatter.format(value);     return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); Changing this code to:     value = value == null ? "" : formatter.format(value);     return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); seems to fix this. This was already seen in JalviewJS testing (issue 175, for 'Resolution' for a PDB search, or 'Length' for Uniprot) but resolved somehow in SwingJS. This is it resurfacing in VAqua5. Fixing in the Jalview code should be more reliable.
            Hide
            jprocter Jim Procter added a comment -
            Seems to work fine for me on local eclipse build / java 12.
            Show
            jprocter Jim Procter added a comment - Seems to work fine for me on local eclipse build / java 12.

              People

              • Assignee:
                soares Ben Soares
                Reporter:
                jprocter Jim Procter
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: