CesiumGS / CesiumGS/cesium

Additional debugging information when a DrawCommand fails

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

Description

Some background: I have a big, complex application built on Cesium. One of the systems we load data from recently had a major upgrade and now our application is crashing, and I can't for the life of me figure out why. I'm trying to reproduce a test case, but I think if I knew how to reproduce it in a simpler context, I could probably figure out how to stop it from happening in the first place.

Each time it crashes, I get a stack trace that points to [this line in Context.js](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Renderer/Context.js#L1032), which I managed to ascertain is because `drawCommand._vertexArray` has been destroyed. (`drawCommand.owner` is a BillboardCollection, if that helps.) It sounded a lot like #6916 but a) I'm already using 1.49 which includes the fix for that issue, and b) I've actually seen several other issues with very similar stack traces even though the root causes were wildly different.

That brings me to what I actually hope to achieve here. Yes, I would love some suggestions of what my next steps should be trying to debug this, but more than that I'd like some capability to generate a more helpful message than "somebody destroyed this at some point, for some reason". Is this already possible? Could it be added, probably behind a debug flag, for performance reasons?

Contributor guide

Open the contributing guide

Research direction

Start at Source/Renderer/Context.js around the DrawCommand failure at line 1032, and inspect how drawCommand._vertexArray and drawCommand.owner are handled. Determine what debug information or debug-flagged diagnostics can identify where the vertex array was destroyed, then verify that the failure produces a more helpful message without affecting normal performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.