URGENT: Rendering Error: Rendering has stopped. TypeError: cannot read property 'vertexAttributes'?

Hi All,

1. A concise explanation of the problem you’re experiencing.

I am getting a rendering error while flying to a location on my viewer, please see the screen shot below.

From what I can make of the problem, it seems to be a problem with the 3D Tileset I am using, however the exact same code was working a day ago. The code also runs perfectly when running the node server locally. This problem is occurring while trying to run the code on my local machine from a red hat linux university server.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

var version = Cesium.VERSION;
console.log("Your version of Cesium is: " + version);

// Initiates a Cesium viewer object with optional properties
var viewer = new Cesium.Viewer('cesiumContainer', {
    shadows : false,
    scene3DOnly : true
});

/*  Sets an Collection changed event that will notify the console when a entity is added, changed or removed
    Adapted from: Cesium (2017) 'Tutorial: Visualizing Spatial Data' Cesium. Accessed at: https://cesiumjs.org/tutorials/Visualizing-Spatial-Data/
    Accessed on: 31.07.17 */
function onChange(collection, added, removed, changed) {
    var msg = 'Added IDs';
    for (var i = 0; i < added.length; i++) {
        msg += '\n' + added[i].id;
    }
    console.log(msg);
}
viewer.entities.collectionChanged.addEventListener(onChange);

var t0 = performance.now();
// Adds the tileset to the viewer
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
    url : '../../../gx_data/10x10'
    //debugColorizeTiles : true,
    //debugShowUrl : true,
    //debugShowBoundingVolume : true
}));
var t1 = performance.now();
console.log("Tileset took " + (t1 - t0).toFixed(5) + " milliseconds to load");

// Adds terrain to the viewer to make sure tileset does not float above ellipsoid

var terrainProvider = new Cesium.CesiumTerrainProvider({
url : ‘https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles’,
requestWaterMask : true,
requestVertexNormals : true
});
viewer.terrainProvider = terrainProvider;

// Adds a function to fly to Bath
function goToBath() {
Sandcastle.declare(goToBath);
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(-2.354662, 51.391676, 5000)
});
}

// Adds a button for the fly to Bath method
Sandcastle.addToolbarButton(‘Go To Bath’, function(){
var t0 = performance.now();
goToBath();
var t1 = performance.now();
console.log(“Fly to Bath took " + (t1-t0) + " milliseconds”);
});


**3. Context. Why do you need to do this? We might know a better way to accomplish your goal.**

The fly through function is used to zoom the viewer from the globe to the area of interest for the app.

**4. The Cesium version you're using, your operating system and browser.**

Cesium 1.34

Google Chrome

MacOS Sierra

Any ideas would be hugely appreciated! This is for a masters dissertation project and I cannot finish the performance testing without this working.

Many Thanks,

![Screen Shot 2017-08-16 at 22.59.00.png|1397x297](upload://sRAzYXQ842NYoPAwfl2g9HQoyDn.png)

It seems like either a shader is missing or compilation failed in some way. Are there any errors in the Chrome console?

After checking that try using Cesium 1.36. If that doesn’t help I’d be happy to look at the tileset for any issues.

Hi Sean,

Many thanks for getting back to me, apologies for the slow reply on my end.

Please see the attached picture for the error that is coming up in the Chrome console. Perhaps you can make more sense of it than me.

It turns out I am using Cesium 1.36 already.

I would be happy for you to look at the tileset. Although it is exactly the same tileset that is running with no issues locally, so I would be surprised if it is that. I also need to check that the company who provided the tileset to me would be happy for me to do this.

Thanks a lot for your help, appreciate it.

Screenshot would help!

Hm the console message doesn’t reveal too much more. Are the b3dm files self-contained or do they reference any external shaders?

Hmm when you say an external shader?

Like does the glTF within the b3dm point to an external .glsl file? Usually shaders are embedded as data-uris but in this case maybe not?