Skip to content

Client crash (NPE) in CheckBoxScrollList cell renderer when JCheckBox is null #1747

Description

@jcschaff

Summary

A NullPointerException is thrown from the CheckBoxScrollList cell renderer
during painting: the renderer dereferences a JCheckBox that is null. This
crashes on the Swing EDT while a checkbox list (e.g. a data-variable / filter
selection list) is being displayed.

Reported via an auto-submitted client crash report.

Environment

  • VCell Rel_Version_8.0.0_build_03
  • Windows 11, Java 17.0.7 (amd64)

Observed

java.lang.NullPointerException: Cannot invoke "javax.swing.JCheckBox.isSelected()" because "checkBox" is null
    at cbit.vcell.client.data.CheckBoxScrollList$CheckBoxRenderer.getListCellRendererComponent(CheckBoxScrollList.java:86)
    at cbit.vcell.client.data.CheckBoxScrollList$CheckBoxRenderer.getListCellRendererComponent(CheckBoxScrollList.java:78)
    ... (dispatched from the AWT event queue during list rendering)

Expected

The checkbox list renders without a crash; a missing/absent checkbox for a list
entry should be handled gracefully (render an empty/default cell) rather than
throwing on the EDT.

Notes

CheckBoxScrollList$CheckBoxRenderer.getListCellRendererComponent at
CheckBoxScrollList.java:86 needs a null guard on the per-row JCheckBox
(list model and checkbox array likely out of sync).


Source: VCell support email (Message-ID 52c29785d87245539c041944807db601@MN6PR14MB7148.namprd14.prod.outlook.com). Reporter details withheld.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions