Repository navigation
Dispose stray validation scenes after every test - #1923
Merged
bkaradzic-microsoft merged 1 commit intoOct 8, 2026
Merged
bkaradzic-microsoft merged 1 commit into
bkaradzic-microsoft merged 1 commit into
Conversation
BabylonJS#1920 moved stray-scene disposal behind the leak-cleanup workaround. When a test fails before currentScene is assigned (for example, wait-for-import rejects for the OpenPBR test), the scene it created was left on the reused engine for later tests. Dispose engine.scenes unconditionally again and keep only the texture-cache release and Draco reset behind leak-cleanup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 97f1ddbf-b571-4a6c-8cb3-411b37e0d15a
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes correctly restore unconditional scene isolation and align the workaround documentation with the implementation.
0 open findings
What changed in this PR
Restores unconditional cleanup of stray validation scenes to prevent failed tests from contaminating later tests.
Changes:
- Disposes all remaining engine scenes after every test.
- Restricts
leak-cleanupto texture and Draco state cleanup. - Updates workaround documentation.
| File | Description |
|---|---|
Apps/Playground/Scripts/validation_native.js |
Moves stray-scene disposal into unconditional test cleanup. |
Documentation/AddingNewValidationTests.md |
Documents the revised cleanup behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bghgary
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1920, addressing #1920 (comment).
#1920 moved stray-scene disposal behind the
leak-cleanupworkaround. If a test fails beforecurrentSceneis assigned (for example,wait-for-importrejects for the OpenPBR test), the scene it created stayed registered on the reused engine and could affect later tests.cleanupAfterTestdisposesengine.scenesafter every test again, as it did before Key validation example workarounds per test in config.json #1920.leak-cleanupnow covers only the texture-cache release and the Draco reset. Stray scenes no longer count toward its "applied" log, because that disposal is now unconditional.validation_native.jsandDocumentation/AddingNewValidationTests.md.Validated locally on Win32 D3D11 with
Draco Mesh Compression (fallback),GLTF Serializer KHR gpu instancing, andOpenPBR Transmission Roughness vs IOR - Analytic Lights.