# Rendering mesh

**URL:** https://discourse.vtk.org/t/rendering-mesh/15566
**Category:** vtk.js
**Tags:** vtkjs
**Created:** [May 5, 2025, 12:14pm UTC](https://discourse.vtk.org/t/rendering-mesh/15566 "2025-05-05T12:14:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![OlumideSamuel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/a6a055/32.png) [@OlumideSamuel](https://discourse.vtk.org/u/OlumideSamuel)
#### Post date: [May 5, 2025, 12:14pm UTC](https://discourse.vtk.org/t/rendering-mesh/15566/1 "2025-05-05T12:14:06Z")

</div>

After an update of my node env to 22.14.0 and update of vtk.js to 26.8.0, and react-vtk-js to 1.18.0, my mesh crashes with the errors  
`Uncaught TypeError: this.polydata is null`, `Uncaught TypeError: this.scalarBar is null`, `Uncaught TypeError: this.selector is null`, `Uncaught TypeError: this.renderWindow is null`.

Error persists after a successful downgrade to prev version.

```auto
const vtkdata = {
nids: [...],
vpts: [...],
vpolys: [...],
vfun:[...]
}
...
<View
          id="0"
          background={[0.75, 0.75, 0.75]}
          pickingModes={['click']}
        >
          {/* Main Mesh */}
          <GeometryRepresentation
            mapper={{
              interpolateScalarsBeforeMapping: true,
            }}
            colorDataRange={controlProps.colorDataRange}
            actor={{ visibility: controlProps.clickedMeshVisibility }}
            showScalarBar={true}
            colorMapPreset={"Cool to Warm"}
          onDataAvailable={(e) => { console.log("event update ", e) }}
          >
            {/* <RequestRenderer /> */}
            <PolyData
              points={vtkdata.vpts}
              polys={vtkdata.vpolys}
            >
              <PointData >
     
                {vtkdata.vfun.length > 0 && (
                  <DataArray registration="setScalars" values={vtkdata.vfun} />
                )}
              </PointData>
            </PolyData>
          </GeometryRepresentation>
        </View>

```

---

<div class="post-metadata">

### Author: ![OlumideSamuel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/a6a055/32.png) [@OlumideSamuel](https://discourse.vtk.org/u/OlumideSamuel)
#### Post date: [May 20, 2025, 9:41am UTC](https://discourse.vtk.org/t/rendering-mesh/15566/2 "2025-05-20T09:41:24Z")

</div>

This error occurs because there was a quick reload that wasn’t caught when a state changes within the application. Hence, a repaint was attempted that caused this error to be thrown.  
Fixed that and problem gone.
