# 3D Tiles: Cannot read property 'subarray' of undefined

**URL:** <https://community.cesium.com/t/3d-tiles-cannot-read-property-subarray-of-undefined/5204>\
**Category:** CesiumJS\
**Created:** [February 23, 2017, 10:17pm UTC](https://community.cesium.com/t/3d-tiles-cannot-read-property-subarray-of-undefined/5204 "2017-02-23T22:17:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Bower](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@Adam\_Bower](https://community.cesium.com/u/Adam_Bower)\
**Post date:** [February 23, 2017, 10:17pm UTC](https://community.cesium.com/t/3d-tiles-cannot-read-property-subarray-of-undefined/5204/1 "2017-02-23T22:17:21Z")

</div>

Hey everyone,

For the past few days i’ve been trying to add a batch table to a .b3dm file, and create a batch file with a batch table inside of it. However upon doing so i’m met with the error:

An error occurred while rendering. Rendering has stopped.

TypeError: Cannot read property ‘subarray’ of undefined  
TypeError: Cannot read property ‘subarray’ of undefined  
at we ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:489:20629](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:489:20629))  
at me.getBuffer ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:490:22761](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:490:22761))  
at Ge ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:489:26934](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:489:26934))  
at Mi.execute ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:490:26703](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:490:26703))  
at a.execute ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:508:25577](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:508:25577))  
at We ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:489:27473](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:489:27473))  
at zt ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:490:12670](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:490:12670))  
at ye.update ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:491:363](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:491:363))  
at C.update ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:498:21412](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:498:21412))  
at R.process ([https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:502:2770](https://generator-abhub.c9users.io/cesium/Cesium/Cesium.js:502:2770))

I’m not sure as to why this has occurred, as I’ve had added a batchId to both attributes, techniques, and parameters of my glTF file, such that my glTF file looks like this ([http://pastebin.com/3HtLYLJf](http://pastebin.com/3HtLYLJf)). I’ve also included the attribute ‘a\_batchId’ into the vertex shader. There is only one batch id in the tile, i.e. a single feature, so the batch table looks like this:

{

“id” : [“demoTile”],  
“displayName” : [“River Hall”],  
“yearBuilt” : [1850],

}

Which seems valid to me. Therefore I was wondering weather or not this error has occurred, because i haven’t put the batch ids into the binary data correctly? If so could you clarify how to add batch ids into the binary data. Also sorry that I can’t post the converted model, as its not my property. However I can provide all other types of information.

All the best, and thanks for any help you can give me on this issue.

---

<div class="post-metadata">

**Author:** ![sean\_lilley](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sean_lilley/32/2083_2.png) [@sean\_lilley](https://community.cesium.com/u/sean_lilley)\
**Post date:** [February 28, 2017, 12:26am UTC](https://community.cesium.com/t/3d-tiles-cannot-read-property-subarray-of-undefined/5204/2 "2017-02-28T00:26:59Z")

</div>

The bufferView\_batchId references a buffer called binary\_glTF that doesn’t exist. Changing it to KHR\_binary\_glTF should work.

Just a note on the naming for the binary buffer - some of our tools used to incorrectly name it KHR\_binary\_glTF instead of binary\_glTF. Functionally it will work the same in Cesium with either name but this is partly responsible for the confusion.
