Details
-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.12.0
-
Fix Version/s: 2.12.0
-
Component/s: gui, Test suite
Description
Running jalview.gui.ScalePanelTest after both jalview.gui.AlignViewportTest and jalview.gui.PainRefresherTest tests cause it to fail. A NullPointerException is thrown during the test by IdCanvas#paintComponent. Possibly caused by the implementation of AlignViewport#getAlignPanel() returning null.
The location where the failing run diverges from the successful run is probably at jalview.gui.SeqPanel#selection line 2758. A debugger shows that for passing runs the value of iSentTheSelection is true and the method returns at the first if branch while for failing runs it processes further calling AlignViewport#isColSelChanged at line 2778.
java.lang.NullPointerException
at jalview.gui.IdCanvas.paintComponent(IdCanvas.java:226)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1074)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1643)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1618)
at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1556)
at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:262)
at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1323)
at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203)
at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013)
at jalview.gui.AlignmentPanel$2.propertyChange(AlignmentPanel.java:194)
at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
at jalview.viewmodel.AlignmentViewport.notifySequence(AlignmentViewport.java:3325)
at jalview.viewmodel.AlignmentViewport.isColSelChanged(AlignmentViewport.java:1429)
at jalview.gui.SeqPanel.selection(SeqPanel.java:2778)
at jalview.structure.StructureSelectionManager.sendSelection(StructureSelectionManager.java:1401)
at jalview.gui.AlignViewport.sendSelection(AlignViewport.java:526)
at jalview.gui.ScalePanel.leftMouseButtonPressed(ScalePanel.java:273)
at jalview.gui.ScalePanel.mousePressed(ScalePanel.java:136)
at jalview.gui.ScalePanelTest.testSelectColumns_withHidden(ScalePanelTest.java:111)
command to run tests:
gradle test --tests 'jalview.gui.AlignViewportTest' --tests 'jalview.gui.PaintRefresherTest' --tests 'jalview.gui.ScalePanelTest'
Note: re-running the tests after the failure will result in a pass due to the changing order of the test execution. Run gradle cleanTests before testing.
The location where the failing run diverges from the successful run is probably at jalview.gui.SeqPanel#selection line 2758. A debugger shows that for passing runs the value of iSentTheSelection is true and the method returns at the first if branch while for failing runs it processes further calling AlignViewport#isColSelChanged at line 2778.
java.lang.NullPointerException
at jalview.gui.IdCanvas.paintComponent(IdCanvas.java:226)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1074)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1643)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1618)
at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1556)
at java.desktop/javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:262)
at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1323)
at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203)
at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013)
at jalview.gui.AlignmentPanel$2.propertyChange(AlignmentPanel.java:194)
at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
at jalview.viewmodel.AlignmentViewport.notifySequence(AlignmentViewport.java:3325)
at jalview.viewmodel.AlignmentViewport.isColSelChanged(AlignmentViewport.java:1429)
at jalview.gui.SeqPanel.selection(SeqPanel.java:2778)
at jalview.structure.StructureSelectionManager.sendSelection(StructureSelectionManager.java:1401)
at jalview.gui.AlignViewport.sendSelection(AlignViewport.java:526)
at jalview.gui.ScalePanel.leftMouseButtonPressed(ScalePanel.java:273)
at jalview.gui.ScalePanel.mousePressed(ScalePanel.java:136)
at jalview.gui.ScalePanelTest.testSelectColumns_withHidden(ScalePanelTest.java:111)
command to run tests:
gradle test --tests 'jalview.gui.AlignViewportTest' --tests 'jalview.gui.PaintRefresherTest' --tests 'jalview.gui.ScalePanelTest'
Note: re-running the tests after the failure will result in a pass due to the changing order of the test execution. Run gradle cleanTests before testing.
Attachments
Issue Links
- related with
-
JAL-4146 Broken tests on Release 2.12 Branch
- In Progress