CesiumGS / CesiumGS/cesium

Automatic detection for missing scene destroy in specs

Open
#7,077 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category - packaging & tooling
Dominant language
JavaScript
Stars
15.8k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

It should be straightforward to add the ability for the tests to dump out a message or produce an error if someone creates a scene instance but does not remember to destroy it. Basically, whenever anyone calls createScene in the specs, we would store it in a global list (and it gets removed when the scene is destroyed). At the end of the tests, any scenes that still exist would get dumped out with the location where it was created (using a callstack retrieved during the creation process).

This should help us keep a handle on scenes (and possible other resources) that need to be cleaned up as part of tests rather than relying on GC.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating createScene in the specs and the existing scene-destruction and test-teardown paths. Trace how scenes are created and destroyed, then define a cleanup check that records creation locations and reports any scenes still alive at the end of tests. Done means leaked scenes are identified without relying on garbage collection.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
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.