• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / builder / 26915325312
52%

Build:
DEFAULT BRANCH: master
Ran 03 Jun 2026 09:57PM UTC
Jobs 1
Files 326
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jun 2026 09:52PM UTC coverage: 51.631% (-0.1%) from 51.748%
26915325312

push

github

web-flow
fix: dispose Three.js renderer before Babylon.js screenshot to fix black wearable thumbnail (#3414)

* fix: dispose Three.js renderer before Babylon.js screenshot to fix black thumbnail

When a user selects a wearable category, updateThumbnailByCategory calls
getModelData with EngineType.BABYLON. This path first loads the model with
Three.js (creating a WebGL context) and then calls getScreenshot which creates
a second Babylon.js WebGL context — both active simultaneously.

Browsers limit active WebGL contexts to 8-16; having two new contexts alongside
the existing WearablePreview renderer can exhaust the limit, causing Babylon.js
to produce a blank/black screenshot that replaces the valid initial thumbnail.

Fix: dispose the Three.js renderer before calling getScreenshot so only one
WebGL context is active at a time. Also adds renderer cleanup to the catch block
to prevent context leaks when errors occur before the normal disposal point.

Closes https://github.com/decentraland/builder/issues/3413

* fix: dispose Babylon.js engine and scene after screenshot to prevent WebGL context leak

The getScreenshot function was never disposing the Babylon.js Engine or Scene
after taking a screenshot. Each call leaked a WebGL context, and after a few
uploads the browser's context limit (~8-16) was hit, causing subsequent
renders to silently produce empty thumbnails with no error.

Changes:
- Wrap getScreenshot body in try/finally to ensure Engine disposal
- Call scene.dispose() and engine.dispose() after screenshot is captured
- Add webglcontextlost event listener to detect context exhaustion and
  throw an explicit error instead of silently returning an empty image
- Guard canvas.removeChild with parentNode check for safety

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

2207 of 5477 branches covered (40.3%)

Branch coverage included in aggregate %.

0 of 83 new or added lines in 2 files covered. (0.0%)

1 existing line in 1 file now uncovered.

7102 of 12553 relevant lines covered (56.58%)

33.74 hits per line

Uncovered Changes

Lines Coverage ∆ File
71
2.42
-0.71% src/lib/getScreenshot.ts
12
7.75
-0.39% src/lib/getModelData.ts

Coverage Regressions

Lines Coverage ∆ File
1
2.42
-0.71% src/lib/getScreenshot.ts
Jobs
ID Job ID Ran Files Coverage
1 26915325312.1 03 Jun 2026 09:57PM UTC 652
53.4
GitHub Action Run
Source Files on build 26915325312
  • Tree
  • List 326
  • Changed 200
  • Source Changed 2
  • Coverage Changed 200
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26915325312
  • 1c6b265a on github
  • Prev Build on 8.14.0 (#26565559346)
  • Next Build on master (#26955921481)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc