# Uncaught TypeError: Cannot read property 'subtractToRef' of undefined

**URL:** <https://forum.babylonjs.com/t/uncaught-typeerror-cannot-read-property-subtracttoref-of-undefined/17388>\
**Category:** Questions\
**Created:** [January 12, 2021, 6:04am UTC](https://forum.babylonjs.com/t/uncaught-typeerror-cannot-read-property-subtracttoref-of-undefined/17388 "2021-01-12T06:04:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuemiao](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yuemiao/32/13136_2.png) [@yuemiao](https://forum.babylonjs.com/u/yuemiao)\
**Post date:** [January 12, 2021, 6:04am UTC](https://forum.babylonjs.com/t/uncaught-typeerror-cannot-read-property-subtracttoref-of-undefined/17388/1 "2021-01-12T06:04:02Z")

</div>

I want to render objects with BABYLON.Mesh,Why does this problem arise？

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/3/362da6919beddf2dbf1c9a6fadb30a50744fc995.png)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [January 12, 2021, 10:15am UTC](https://forum.babylonjs.com/t/uncaught-typeerror-cannot-read-property-subtracttoref-of-undefined/17388/2 "2021-01-12T10:15:09Z")

</div>

Hard to say without a repro…

Make sure your vertex and index arrays have valid data (display them in the console).
