1. A concise explanation of the problem you’re experiencing.
I have an web site which uses Terrain and I recently switched over to using PickPosition from pickEllipsoid while I am in 3D mode.
I have noticed that intermittenly I get a black box with the following text.
An error occurred while rendering. Rendering has stopped
TypeError: Cannot read property ‘_target’ of undefined
TypeError: Cannot read property ‘_target’ of undefined
at _.set(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:467:25518)
at d._setUniforms(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:468:6230)
at H(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:497:1822)
at z.draw(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:497:5817)
at n.execute(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:467:5406)
at Ue(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:520:27684)
at Ye(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:520:28667)
at Qe(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:521:753)
at rt(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:521:5871)
at et(XXXXX/Cesium-1.54/Build/Cesium/Cesium.js:521:3185)
I have noticed this occurs more often when I have Cesium Primitives with appearance:
feature = new Cesium.Primitive({
geometryInstances: primitive,
allowPicking: pickable,
interleave: true,
appearance: tmpAppearance
});
Looking at Cesium.js and the source code I think this must be coming from createUniform.js line 226: (gl.bindTexture(v._target, v._texture);
or createUniformArray.js line 304: gl.bindTexture(v._target, v._texture);
Is there a way this this code could be more defensive?
Thanks in advance
Jerrold Stoy
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
4. The Cesium version you’re using, your operating system and browser.
Cesium1.54, Windows 10, Chrome version 71+