CesiumGS / CesiumGS/cesium

Cesium fails to render Intermittently

Open
#9,255 0 comments 0 reactions 0 assignees View on GitHub
category - graphics type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

In my use case, on click of button, I have to reset the map and remove all Geojson data sources, imagery layers and terrain provider and load new data which comes from API call. This works most of time but sometimes it fails to render and show following error -

```js
CesiumWidget.js?842c:34 [Violation] 'requestAnimationFrame' handler took 163ms
CesiumWidget.js?842c:672 An error occurred while rendering. Rendering has stopped.
TypeError: Cannot read property 'red' of undefined
TypeError: Cannot read property 'red' of undefined
at UniformArrayFloatVec4.set (webpack-internal:///./node_modules/cesium/Source/Renderer/createUniformArray.js:270:76)
at ShaderProgram._setUniforms (webpack-internal:///./node_modules/cesium/Source/Renderer/ShaderProgram.js:607:17)
at continueDraw (webpack-internal:///./node_modules/cesium/Source/Renderer/Context.js:1114:17)
at Context.draw (webpack-internal:///./node_modules/cesium/Source/Renderer/Context.js:1179:3)
at DrawCommand.execute (webpack-internal:///./node_modules/cesium/Source/Renderer/DrawCommand.js:570:11)
at executeCommand (webpack-internal:///./node_modules/cesium/Source/Scene/Scene.js:2201:13)
at executeCommands (webpack-internal:///./node_modules/cesium/Source/Scene/Scene.js:2498:9)
at executeCommandsInViewport (webpack-internal:///./node_modules/cesium/Source/Scene/Scene.js:3205:3)
at Scene.updateAndExecuteCommands (webpack-internal:///./node_modules/cesium/Source/Scene/Scene.js:2933:5)
at render (webpack-internal:///./node_modules/cesium/Source/Scene/Scene.js:3809:9)
```

I can hardly reproduce this but I've seen this happen on Firefox frequently. It does happens on chrome sometimes but not as frequent as Firefox.

Browser:
1. Firefox - 82.0.2 (64-bit)
2. Chrome - 86.0.4240.111 (Official Build) (64-bit)

Operating System: Ubuntu 20.04.1 LTS

PS: Since this is happening intermittently, I'm not able to create a sandcastle example, sorry!

Contributor guide

Open the contributing guide

Research direction

Start with the reported stack trace in CesiumWidget.js, createUniformArray.js, ShaderProgram.js, Context.js, and Scene.js, then reproduce the button-triggered reset and reload sequence in Firefox. Done means identifying the intermittent undefined uniform condition and confirming that resetting GeoJSON data sources, imagery layers, and terrain no longer stops rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.