fix(babylon): a texture or environment that fails to load stays in the scene until Stop
I maintainer di solito rispondono entro 1 giorno
@kalwalt ci sta già lavorando.
Dal 19/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Problem
Found by Qodo's review of the v0.4.0 release PR (#184), and checked on dev at 8dce01f:
- In the Babylon.js adapter (
src/runtime/renderers/babylon-adapter.ts), a texture that fails to load is not disposed:environmentTexture()(line 372): theHDRCubeTexture's error callback (line 380) revokes the blob URL and rejects, but leaves the texture in the scene;createTexture(), an image by its URL (line 599): theTexture'sonErrorrejects and leaves the texture in the scene.
- At init this costs nothing for long: the node's init fails, the runtime stops, and the scene's teardown disposes every texture it holds.
- A live environment change is different.
setEnvironment()(line 773) loads the new source while the scene keeps running; when the load fails (a.hdrfile that does not parse), it keeps the texture shown, as it should, and the failedHDRCubeTexturestays inscene.texturesuntil Stop. Each failed change adds one. - The Three.js adapter has no such case: it parses the
.hdritself and makes its textures only from a parse that succeeded.
Design
- In both error callbacks, dispose the texture before rejecting.
- Disposing fires the texture's
onDisposeObservable, whose handler (lines 383 and 603) revokes the URL and rejects again. A settled promise ignores the second reject, but the URL must still be revoked once: makedone()inenvironmentTexture()run once (a flag), and keep the "torn down" rejection for a dispose that comes first, from a Stop. - No change to the error messages, nor to what
setEnvironment()keeps on screen after a failed load.
Tasks
- A failing unit test first, in
tests/unit/conformance/environment-babylon.test.ts, which runs the adapter on NullEngine with a fakeHDRCubeTexture: the fake made to call its error callback, a live change to an.hdrthat does not parse rejects, keeps the texture shown, and leavesscene.texturesas long as before the change. - The same for
createTexture()with an image URL that fails, if the test environment can make one fail; otherwise say so in the PR. - The fix of points 1 and 2.
- A CHANGELOG line under Fixed.
Files
src/runtime/renderers/babylon-adapter.ts, tests/unit/, CHANGELOG.md.
Acceptance
- After a failed live environment change, the scene holds no more textures than before it.
- Every texture and environment test passes on both renderers.
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 0
- Merge medio
- 2h 36m
- PR unite (30g)
- 92
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di webarkit/webarkit-studio
-
editor good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
webarkit/webarkit-studio#16 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(editor): Escape closes the toolbar menus, and focus returns to the menu's buttonForse già presa @kalwalt l’ha presa 1 giorno fa. Apertaeditor enhancement node-graph
webarkit/webarkit-studio#190 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
fix(babylon): an environment whose prefiltering fails never settlesForse già presa @kalwalt l’ha presa 1 giorno fa. ApertaBabylonjs bug
webarkit/webarkit-studio#188 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
fix(editor): on a narrow screen the graph editor has no width; below 900 px the panels become tabsForse già presa @kalwalt l’ha presa 4 giorni fa. Apertabug editor
webarkit/webarkit-studio#182 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
feat(editor): palette groups that collapse, sticky headings and a category barForse già presa @kalwalt l’ha presa 5 giorni fa. Apertaeditor enhancement
webarkit/webarkit-studio#180 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di webarkit/webarkit-studio
Issue simili
-
bug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
garethgeorge/backrest#1451 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderForse già presa @ManyaS-Git l’ha presa 1 giorno fa. Apertastatus:in-linear
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
n8n-io/n8n#45027 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 13 giorni
-
bug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
navikt/skjemabygging-formio#2399 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lidofinance/validator-ejector#233 ·
I maintainer di solito rispondono entro 1 giorno